Skip to content

Commit 09470fe

Browse files
authored
remove side effect imports in exp build (#4323)
1 parent d42bb39 commit 09470fe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/database/rollup.config.exp.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ const es5Builds = [
4949
{ file: path.resolve('exp', pkg.main), format: 'cjs', sourcemap: true }
5050
],
5151
plugins: es5BuildPlugins,
52+
treeshake: {
53+
moduleSideEffects: false
54+
},
5255
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
5356
},
5457
/**
@@ -60,6 +63,9 @@ const es5Builds = [
6063
{ file: path.resolve('exp', pkg.module), format: 'es', sourcemap: true }
6164
],
6265
plugins: es5BuildPlugins,
66+
treeshake: {
67+
moduleSideEffects: false
68+
},
6369
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
6470
}
6571
];
@@ -91,6 +97,9 @@ const es2017Builds = [
9197
{ file: path.resolve('exp', pkg.esm2017), format: 'es', sourcemap: true }
9298
],
9399
plugins: es2017BuildPlugins,
100+
treeshake: {
101+
moduleSideEffects: false
102+
},
94103
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
95104
}
96105
];

0 commit comments

Comments
 (0)