diff --git a/src/index.ts b/src/index.ts index 47c068def..2aec8cf14 100755 --- a/src/index.ts +++ b/src/index.ts @@ -457,8 +457,8 @@ if (process.env.NODE_ENV === 'production') { function writeMjsEntryFile(name: string) { const contents = ` -export { default } from './${name}.min.mjs'; -export * from './${name}.min.mjs'; +export { default } from './${safePackageName(name)}.min.mjs'; +export * from './${safePackageName(name)}.min.mjs'; `; return fs.outputFile(path.join(paths.appDist, 'index.mjs'), contents); } diff --git a/test/e2e/tsdx-build-invalid.test.ts b/test/e2e/tsdx-build-invalid.test.ts index 8db344b85..4f9336be9 100644 --- a/test/e2e/tsdx-build-invalid.test.ts +++ b/test/e2e/tsdx-build-invalid.test.ts @@ -21,12 +21,12 @@ describe('tsdx build :: invalid build', () => { }); it('should only transpile and not type check', () => { - const output = execWithCache('node ../dist/index.js build --legacy --transpileOnly'); + const output = execWithCache( + 'node ../dist/index.js build --legacy --transpileOnly' + ); expect(shell.test('-f', 'dist/index.cjs')).toBeTruthy(); - expect( - shell.test('-f', 'dist/build-invalid.development.cjs') - ).toBeTruthy(); + expect(shell.test('-f', 'dist/build-invalid.development.cjs')).toBeTruthy(); expect( shell.test('-f', 'dist/build-invalid.production.min.cjs') ).toBeTruthy(); diff --git a/test/e2e/tsdx-build-options.test.ts b/test/e2e/tsdx-build-options.test.ts index d9ae1703c..98cafee19 100644 --- a/test/e2e/tsdx-build-options.test.ts +++ b/test/e2e/tsdx-build-options.test.ts @@ -46,7 +46,9 @@ describe('tsdx build :: options', () => { }); it('should not bundle regeneratorRuntime when targeting Node', () => { - const output = execWithCache('node ../dist/index.js build --legacy --target node'); + const output = execWithCache( + 'node ../dist/index.js build --legacy --target node' + ); expect(output.code).toBe(0); const matched = grep(/regeneratorRuntime = r/, [