Skip to content

Commit a4c5611

Browse files
committed
clearer logic
1 parent 75f8a85 commit a4c5611

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dev-packages/rollup-utils/npmHelpers.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ export function makeBaseNPMConfig(options = {}) {
8787

8888
treeshake: {
8989
moduleSideEffects: (id, external) => {
90-
return external === false && ignoreSideEffects.test(id);
90+
if (external === false && ignoreSideEffects.test(id)) {
91+
// Tell Rollup this module has no side effects, so it can be tree-shaken
92+
return false;
93+
}
94+
95+
return true;
9196
}
9297
},
9398

0 commit comments

Comments
 (0)