diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index f4e4198b06186..18308812afd6d 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -564,7 +564,8 @@ async function createBundle(bundle, bundleType) { const rollupConfig = { input: resolvedEntry, treeshake: { - pureExternalModules, + moduleSideEffects: (id, external) => + !(external && pureExternalModules.includes(id)), }, external(id) { const containsThisModule = pkg => id === pkg || id.startsWith(pkg + '/');