diff --git a/package.json b/package.json index 03f8e86174..9525c4157e 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "test": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/ --coverage -i --logHeapUsage", "test:unit": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/unit/ --coverage -i --logHeapUsage", "test:integration": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/integration/ --coverage -i --logHeapUsage", + "preview": "vite preview", "build:umd": "rimraf ./dist && rollup -c && npm run size", "build:cjs": "rimraf ./lib && tsc --module commonjs --outDir lib", "build:esm": "rimraf ./esm && tsc --module ESNext --outDir esm", diff --git a/rollup.config.js b/rollup.config.js index ed3e9a2de5..b798a62435 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -20,6 +20,8 @@ export default [ input, treeshake: { preset: 'smallest', + // Set `src/exports` as a sideEffects file. + moduleSideEffects: (id, external) => id.includes('src/exports.ts') ? true : false, }, output: [ {