chore(build): disable tsup minification & add "use strict"; banner to CJS bundles (#7725)

* chore(build): disable tsup minification

* chore(build): add `"use strict";` to CJS bundles
This commit is contained in:
Jeroen Claassens
2022-03-28 21:34:58 +02:00
committed by GitHub
parent 520f471ac5
commit ac4bc3a6c8
4 changed files with 32 additions and 4 deletions

View File

@@ -5,9 +5,16 @@ export const tsup: Options = {
dts: false,
entryPoints: ['src/index.ts'],
format: ['esm', 'cjs'],
minify: true,
minify: false,
keepNames: true,
skipNodeModulesBundle: true,
sourcemap: true,
target: 'es2021',
esbuildOptions: (options, context) => {
if (context.format === 'cjs') {
options.banner = {
js: '"use strict";',
};
}
},
};