From bd8e22497d02658afd6c90ef5a540c0dfa525a22 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Wed, 15 May 2019 12:57:04 -0300 Subject: [PATCH] Stop handling 'global' in the Node-specific bundles (#6124) --- scripts/build/build.js | 2 +- scripts/build/bundler.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/build/build.js b/scripts/build/build.js index e4524e199..dafae2ad3 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -99,7 +99,7 @@ async function run(params) { await execa("rm", ["-rf", ".cache"]); } - const bundleCache = new Cache(".cache/", "v10"); + const bundleCache = new Cache(".cache/", "v11"); await bundleCache.load(); console.log(chalk.inverse(" Building packages ")); diff --git a/scripts/build/bundler.js b/scripts/build/bundler.js index 5e95c3322..1486b0d03 100644 --- a/scripts/build/bundler.js +++ b/scripts/build/bundler.js @@ -119,7 +119,12 @@ function getRollupConfig(bundle) { extensions: [".js", ".json"], preferBuiltins: bundle.target === "node" }), - commonjs(bundle.commonjs || {}), + commonjs( + Object.assign( + bundle.target === "node" ? { ignoreGlobal: true } : {}, + bundle.commonjs + ) + ), bundle.target === "universal" && nodeGlobals(), babelConfig && babel(babelConfig), bundle.type === "plugin" && uglify()