Skip to content

Commit a2c8145

Browse files
committed
Disabled code splitting for cjs in Emmett package
1 parent 812ee4b commit a2c8145

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

src/packages/emmett/tsup.config.ts

+32-15
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,35 @@ import { defineConfig } from 'tsup';
22

33
const env = process.env.NODE_ENV;
44

5-
export default defineConfig({
6-
splitting: true,
7-
clean: true, // clean up the dist folder
8-
dts: true, // generate dts files
9-
format: ['esm', 'cjs'], // generate cjs and esm files
10-
minify: true, //env === 'production',
11-
bundle: true, //env === 'production',
12-
skipNodeModulesBundle: true,
13-
watch: env === 'development',
14-
target: 'esnext',
15-
outDir: 'dist', //env === 'production' ? 'dist' : 'lib',
16-
entry: ['src/index.ts', 'src/cli.ts'],
17-
sourcemap: true,
18-
tsconfig: 'tsconfig.build.json', // workaround for https://github.com/egoist/tsup/issues/571#issuecomment-1760052931
19-
});
5+
export default defineConfig([
6+
{
7+
splitting: true,
8+
clean: true, // clean up the dist folder
9+
dts: true, // generate dts files
10+
format: ['esm'], // generate cjs and esm files
11+
minify: true, //env === 'production',
12+
bundle: true, //env === 'production',
13+
skipNodeModulesBundle: true,
14+
watch: env === 'development',
15+
target: 'esnext',
16+
outDir: 'dist', //env === 'production' ? 'dist' : 'lib',
17+
entry: ['src/index.ts', 'src/cli.ts'],
18+
sourcemap: true,
19+
tsconfig: 'tsconfig.build.json', // workaround for https://github.com/egoist/tsup/issues/571#issuecomment-1760052931
20+
},
21+
{
22+
splitting: false,
23+
clean: true, // clean up the dist folder
24+
dts: true, // generate dts files
25+
format: ['cjs'], // generate cjs and esm files
26+
minify: false, //env === 'production',
27+
bundle: true, //env === 'production',
28+
skipNodeModulesBundle: true,
29+
watch: env === 'development',
30+
target: 'esnext',
31+
outDir: 'dist', //env === 'production' ? 'dist' : 'lib',
32+
entry: ['src/index.ts', 'src/cli.ts'],
33+
sourcemap: true,
34+
tsconfig: 'tsconfig.build.json', // workaround for https://github.com/egoist/tsup/issues/571#issuecomment-1760052931
35+
},
36+
]);

0 commit comments

Comments
 (0)