From 2c19fde39b689649a93b96c72816b9f6ca13011f Mon Sep 17 00:00:00 2001 From: Ming Ye Date: Sun, 19 Feb 2023 00:17:58 +0800 Subject: [PATCH] Update rollup config to replace deprecated pureExternalModules with moduleSideEffects --- scripts/rollup/build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 + '/');