Add minimum reproduction

trunk
KernelDeimos 3 years ago
commit 8191115325

2
.gitignore vendored

@ -0,0 +1,2 @@
node_modules/
dist/

@ -0,0 +1,22 @@
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
rollup: {
emitCJS: true,
cjsBridge: true
},
// If entries is not provided, will be automatically inferred from package.json
entries: [
// default
{
input: './entry/index',
}
],
// emitCJS: true,
// cjsBridge: true,
// Change outDir, default is 'dist'
outDir: 'dist',
declaration: true
})

@ -0,0 +1,38 @@
// [C] Copyright 2023 Coherent Constructs
// [!] GENERATED FILE - DO NOT EDIT BY HAND
// [@] Generator node-autoentry.js
// [@] Type node-autoentry
import {TestClass as testpkg_TestClass} from "../src/testpkg/TestClass.js";
import {AnotherClass as testpkg_deeper_AnotherClass} from "../src/testpkg/deeper/AnotherClass";
interface I_testpkg_deeper {
"AnotherClass": new (...args: any[]) => testpkg_deeper_AnotherClass,
}
interface I_testpkg {
"TestClass": new (...args: any[]) => testpkg_TestClass,
"deeper": I_testpkg_deeper;
}
export default (()=>{
const o: {
"testpkg": I_testpkg,
} = {
"testpkg": (()=>{
const o: {
"TestClass": new (...args: any[]) => testpkg_TestClass,
"deeper": I_testpkg_deeper,
} = {
"TestClass": testpkg_TestClass,
"deeper": (()=>{
const o: {
"AnotherClass": new (...args: any[]) => testpkg_deeper_AnotherClass,
} = {
"AnotherClass": testpkg_deeper_AnotherClass,
}
return o;
})(),
}
return o;
})(),
}
return o;
})();

3354
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
{
"name": "npm_unbuild_2023-01-19",
"version": "1.0.0",
"description": "Issue report for unbuild",
"scripts": {
"prepare": "unbuild",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "ssh://git@gitea.coherentconstructs.com:2101/cc-contrib/npm_unbuild_2023-01-19.git"
},
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"author": "Coherent Constructs",
"license": "UNLICENSED",
"devDependencies": {
"unbuild": "^1.1.1"
}
}

@ -0,0 +1,5 @@
export class TestClass {
sayhi () {
return 'hello from TestClass';
}
}

@ -0,0 +1,5 @@
export class AnotherClass {
sayhi(): string {
return 'hello from AnotherClass';
}
}
Loading…
Cancel
Save