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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy