File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 66 "bugs" : {
77 "url" : " https://github.com/MetaMask/utils/issues"
88 },
9+ "sideEffects" : false ,
910 "repository" : {
1011 "type" : " git" ,
1112 "url" : " https://github.com/MetaMask/utils.git"
1920 },
2021 "./package.json" : " ./package.json"
2122 },
22- "main" : " ./dist/index.js" ,
23- "module" : " ./dist/index.mjs" ,
2423 "types" : " ./dist/types/index.d.ts" ,
2524 "files" : [
2625 " dist"
Original file line number Diff line number Diff line change 1818 " ./src/**/__tests__/**/*" ,
1919 " ./src/**/__snapshots__/**/*" ,
2020 " ./src/**/*.test.ts" ,
21+ " ./src/**/*.test-d.ts" ,
2122 " ./src/**/*.test.*.ts"
2223 ]
2324}
Original file line number Diff line number Diff line change @@ -2,7 +2,17 @@ import { defineConfig } from 'tsup';
22
33export default defineConfig ( {
44 // The entry to bundle.
5- entry : [ 'src/index.ts' ] ,
5+ entry : [
6+ 'src/**/*.ts' ,
7+ '!src/**/__fixtures__/**/*' ,
8+ '!src/**/__mocks__/**/*' ,
9+ '!src/**/__test__/**/*' ,
10+ '!src/**/__tests__/**/*' ,
11+ '!src/**/__snapshots__/**/*' ,
12+ '!src/**/*.test.ts' ,
13+ '!src/**/*.test-d.ts' ,
14+ '!src/**/*.test.*.ts' ,
15+ ] ,
616
717 // The output formats. We want to generate both CommonJS and ESM bundles.
818 // https://tsup.egoist.dev/#bundle-formats
@@ -18,9 +28,13 @@ export default defineConfig({
1828 // Enables shimming of `__dirname` and `import.meta.url`, so that they work
1929 // in both CommonJS and ESM.
2030 // https://tsup.egoist.dev/#inject-cjs-and-esm-shims
21- shims : true ,
31+ shims : false ,
2232
2333 // Hide unnecessary logs from the console. Warnings and errors will still be
2434 // shown.
2535 silent : true ,
36+
37+ // Split the output into chunks. This is useful for tree-shaking.
38+ // https://tsup.egoist.dev/#code-splitting
39+ splitting : true ,
2640} ) ;
You can’t perform that action at this time.
0 commit comments