Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit f5cbd88

Browse files
committed
feat: add no side effects optimization
1 parent 68b8aec commit f5cbd88

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"main": "index.cjs.js",
3030
"module": "index.esm.js",
3131
"types": "index.d.ts",
32+
"sideEffects": false,
3233
"scripts": {
3334
"build": "rm -rf dist && rollup -c",
3435
"build:copy": "cp package.json dist/ && cp README.md dist/ && cp LICENSE dist/ && cp src/index.d.ts dist/",

rollup.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const defaultConfig = {
1616
}),
1717
terser(),
1818
],
19+
treeshake: {
20+
moduleSideEffects: false,
21+
},
1922
};
2023

2124
const createConfig = (config) => ({

0 commit comments

Comments
 (0)