Skip to content

Commit bc38a3d

Browse files
authored
Update rollup config to use moduleSideEffects (#26199)
## Summary In rollup v1.19.4, The "treeshake.pureExternalModules" option is deprecated. The "treeshake.moduleSideEffects" option should be used instead, see https://github.com/rollup/rollup/blob/v1.19.4/src/Graph.ts#L130. ## How did you test this change? ci green
1 parent db5e625 commit bc38a3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/rollup/build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ async function createBundle(bundle, bundleType) {
564564
const rollupConfig = {
565565
input: resolvedEntry,
566566
treeshake: {
567-
pureExternalModules,
567+
moduleSideEffects: (id, external) =>
568+
!(external && pureExternalModules.includes(id)),
568569
},
569570
external(id) {
570571
const containsThisModule = pkg => id === pkg || id.startsWith(pkg + '/');

0 commit comments

Comments
 (0)