Switch rollup-plugin-babel to @rollup/plugin-babel (#8282)
* Switch `rollup-plugin-babel` to `@rollup/plugin-babel` * Add `babelHelpers: "bundled"` * Update cache version * Remove `babelHelpers` for webpack * Move `babelHelpers` to rollup only
This commit is contained in:
1 parent
cde4a0af9d
commit
23567c4e43
4 files changed
+15
-15
No files matched your search
+1
-1
@@ -84,6 +84,7 @@
|
||||
"@babel/core": "7.9.6",
|
||||
"@babel/preset-env": "7.9.6",
|
||||
"@rollup/plugin-alias": "3.1.0",
|
||||
"@rollup/plugin-babel": "5.0.0",
|
||||
"@rollup/plugin-commonjs": "11.1.0",
|
||||
"@rollup/plugin-json": "4.0.3",
|
||||
"@rollup/plugin-node-resolve": "7.1.3",
|
||||
@@ -110,7 +111,6 @@
|
||||
"prettier": "2.0.5",
|
||||
"rimraf": "3.0.2",
|
||||
"rollup": "2.8.2",
|
||||
"rollup-plugin-babel": "4.4.0",
|
||||
"rollup-plugin-node-globals": "1.4.0",
|
||||
"rollup-plugin-terser": "5.3.0",
|
||||
"shelljs": "0.8.4",
|
||||
|
||||
@@ -21,7 +21,7 @@ process.on("unhandledRejection", (err) => {
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
const CACHE_VERSION = "v23"; // This need update when updating build scripts
|
||||
const CACHE_VERSION = "v24"; // This need update when updating build scripts
|
||||
const CACHED = chalk.bgYellow.black(" CACHED ");
|
||||
const OK = chalk.bgGreen.black(" DONE ");
|
||||
const FAIL = chalk.bgRed.black(" FAIL ");
|
||||
|
||||
@@ -11,7 +11,7 @@ const nodeGlobals = require("rollup-plugin-node-globals");
|
||||
const json = require("@rollup/plugin-json");
|
||||
const replace = require("@rollup/plugin-replace");
|
||||
const { terser } = require("rollup-plugin-terser");
|
||||
const babel = require("rollup-plugin-babel");
|
||||
const { babel } = require("@rollup/plugin-babel");
|
||||
const nativeShims = require("./rollup-plugins/native-shims");
|
||||
const executable = require("./rollup-plugins/executable");
|
||||
const evaluate = require("./rollup-plugins/evaluate");
|
||||
@@ -151,7 +151,7 @@ function getRollupConfig(bundle) {
|
||||
}
|
||||
Object.assign(replaceStrings, bundle.replace);
|
||||
|
||||
const babelConfig = getBabelConfig(bundle);
|
||||
const babelConfig = { babelHelpers: "bundled", ...getBabelConfig(bundle) };
|
||||
|
||||
const alias = { ...bundle.alias };
|
||||
alias.entries = [...entries, ...(alias.entries || [])];
|
||||
@@ -177,7 +177,7 @@ function getRollupConfig(bundle) {
|
||||
}),
|
||||
externals(bundle.externals),
|
||||
bundle.target === "universal" && nodeGlobals(),
|
||||
babelConfig && babel(babelConfig),
|
||||
babel(babelConfig),
|
||||
bundle.minify !== false && bundle.target === "universal" && terser(),
|
||||
].filter(Boolean);
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
dependencies:
|
||||
"@babel/types" "^7.8.3"
|
||||
|
||||
"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.8.3":
|
||||
"@babel/helper-module-imports@^7.7.4", "@babel/helper-module-imports@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498"
|
||||
integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==
|
||||
@@ -1042,6 +1042,14 @@
|
||||
dependencies:
|
||||
slash "^3.0.0"
|
||||
|
||||
"@rollup/plugin-babel@5.0.0":
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.0.0.tgz#2f01c9555927449c82cb13dd9e56213a358e1ce9"
|
||||
integrity sha512-YpVnwdUeVj/fDFN75Y3CAzJTMYNcqbH05SJs551wqj+BSwLT9pS3dqJrVDPYl3eH4OrI8ueiEseX5VgUn+0HLA==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.7.4"
|
||||
"@rollup/pluginutils" "^3.0.8"
|
||||
|
||||
"@rollup/plugin-commonjs@11.1.0":
|
||||
version "11.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz#60636c7a722f54b41e419e1709df05c7234557ef"
|
||||
@@ -6554,14 +6562,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
|
||||
hash-base "^3.0.0"
|
||||
inherits "^2.0.1"
|
||||
|
||||
rollup-plugin-babel@4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb"
|
||||
integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.0.0"
|
||||
rollup-pluginutils "^2.8.1"
|
||||
|
||||
rollup-plugin-node-globals@1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-globals/-/rollup-plugin-node-globals-1.4.0.tgz#5e1f24a9bb97c0ef51249f625e16c7e61b7c020b"
|
||||
@@ -6585,7 +6585,7 @@ rollup-plugin-terser@5.3.0:
|
||||
serialize-javascript "^2.1.2"
|
||||
terser "^4.6.2"
|
||||
|
||||
rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
|
||||
rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.8.2:
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
|
||||
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
|
||||
|
||||
Reference in new issue
Block a user