feat(building-rollup): move to @rollup/plugin-babel (#1802)

Move from rollup-plugin-babel to @rollup/plugin-babel
This commit is contained in:
Marcos Gil
2020-08-10 18:30:03 +02:00
committed by GitHub
parent 301a800265
commit f5a7c3987d
4 changed files with 18 additions and 10 deletions

View File

@@ -215,7 +215,7 @@ Our config creators install a number of rollup plugins by default:
Basic and SPA config plugins:
- [nodeResolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve#readme)
- [babel](https://github.com/rollup/rollup-plugin-babel#readme)
- [babel](https://github.com/rollup/plugins/tree/master/packages/babel#readme)
- [terser](https://github.com/TrySound/rollup-plugin-terser#readme)
SPA config plugins:

View File

@@ -66,6 +66,7 @@
"@open-wc/building-utils": "^2.18.0",
"@open-wc/rollup-plugin-html": "^1.2.2",
"@open-wc/rollup-plugin-polyfills-loader": "^1.1.3",
"@rollup/plugin-babel": "^5.1.0",
"@rollup/plugin-node-resolve": "^7.1.1",
"babel-plugin-bundled-import-meta": "^0.3.2",
"babel-plugin-template-html-minifier": "^4.0.0",
@@ -74,7 +75,6 @@
"magic-string": "^0.25.7",
"parse5": "^5.1.1",
"regenerator-runtime": "^0.13.3",
"rollup-plugin-babel": "^5.0.0-alpha.1",
"rollup-plugin-terser": "^5.2.0",
"rollup-plugin-workbox": "^5.0.1",
"terser": "^4.6.7"

View File

@@ -3,7 +3,7 @@
/* eslint-disable no-param-reassign */
const resolve = require('@rollup/plugin-node-resolve');
const { terser } = require('rollup-plugin-terser');
const babel = require('rollup-plugin-babel');
const { babel, getBabelOutputPlugin } = require('@rollup/plugin-babel');
const merge = require('deepmerge');
const {
createBabelConfigRollupBuild,
@@ -44,7 +44,7 @@ function createBasicConfig(userOptions = {}) {
dir: opts.outputDir,
plugins: [
// build to js supported by modern browsers
babel.generated(babelConfigRollupGenerate),
getBabelOutputPlugin(babelConfigRollupGenerate),
// create babel-helpers chunk based on es5 build
bundledBabelHelpers({ minify: !developmentMode }),
],
@@ -84,11 +84,11 @@ function createBasicConfig(userOptions = {}) {
assetFileNames: `nomodule-${assetName}`,
plugins: [
// buid to es5
babel.generated(babelConfigLegacyRollupGenerate),
getBabelOutputPlugin(babelConfigLegacyRollupGenerate),
// create babel-helpers chunk based on es5 build
bundledBabelHelpers({ format: 'system', minify: !developmentMode }),
// build to systemjs after helpers, so that helpers can be statically analyzed
babel.generated(babelConfigSystemJs),
getBabelOutputPlugin(babelConfigSystemJs),
],
},
];

View File

@@ -2584,16 +2584,16 @@
integrity sha512-BONpjHcGX2zFa9mfnwBCLEmlDsOHzT+j6Qt1yfK3MzFXFtAykfzFjAgaxPetu0YbBlCfXuMlfxI4vlRGCGMvFg==
"@open-wc/testing-karma-bs@file:./packages/testing-karma-bs":
version "1.3.85"
version "1.3.87"
dependencies:
"@open-wc/testing-karma" "^4.0.0"
"@open-wc/testing-karma" "^4.0.2"
"@types/node" "^11.13.0"
karma-browserstack-launcher "^1.0.0"
"@open-wc/testing-karma@file:./packages/testing-karma":
version "4.0.0"
version "4.0.2"
dependencies:
"@open-wc/karma-esm" "^3.0.0"
"@open-wc/karma-esm" "^3.0.2"
"@types/karma" "^5.0.0"
"@types/karma-coverage-istanbul-reporter" "^2.1.0"
"@types/karma-mocha" "^1.3.0"
@@ -2619,6 +2619,14 @@
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
"@rollup/plugin-babel@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.1.0.tgz#ad8b5803fa6e1feb0f168984edc040b90d966450"
integrity sha512-zXBEYmfiLAMvB+ZBa6m/q9hsQYAq1sUFdjuP1F6C2pf6uQcpHwAWQveZgzS63zXdKPUYHD3Dr7BhjCqcr0bbLw==
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"