Skip to content

Commit f5a7c39

Browse files
authored
feat(building-rollup): move to @rollup/plugin-babel (#1802)
Move from rollup-plugin-babel to @rollup/plugin-babel
1 parent 301a800 commit f5a7c39

4 files changed

Lines changed: 18 additions & 10 deletions

File tree

packages/building-rollup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Our config creators install a number of rollup plugins by default:
215215
Basic and SPA config plugins:
216216

217217
- [nodeResolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve#readme)
218-
- [babel](https://github.com/rollup/rollup-plugin-babel#readme)
218+
- [babel](https://github.com/rollup/plugins/tree/master/packages/babel#readme)
219219
- [terser](https://github.com/TrySound/rollup-plugin-terser#readme)
220220

221221
SPA config plugins:

packages/building-rollup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@open-wc/building-utils": "^2.18.0",
6767
"@open-wc/rollup-plugin-html": "^1.2.2",
6868
"@open-wc/rollup-plugin-polyfills-loader": "^1.1.3",
69+
"@rollup/plugin-babel": "^5.1.0",
6970
"@rollup/plugin-node-resolve": "^7.1.1",
7071
"babel-plugin-bundled-import-meta": "^0.3.2",
7172
"babel-plugin-template-html-minifier": "^4.0.0",
@@ -74,7 +75,6 @@
7475
"magic-string": "^0.25.7",
7576
"parse5": "^5.1.1",
7677
"regenerator-runtime": "^0.13.3",
77-
"rollup-plugin-babel": "^5.0.0-alpha.1",
7878
"rollup-plugin-terser": "^5.2.0",
7979
"rollup-plugin-workbox": "^5.0.1",
8080
"terser": "^4.6.7"

packages/building-rollup/src/createBasicConfig.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* eslint-disable no-param-reassign */
44
const resolve = require('@rollup/plugin-node-resolve');
55
const { terser } = require('rollup-plugin-terser');
6-
const babel = require('rollup-plugin-babel');
6+
const { babel, getBabelOutputPlugin } = require('@rollup/plugin-babel');
77
const merge = require('deepmerge');
88
const {
99
createBabelConfigRollupBuild,
@@ -44,7 +44,7 @@ function createBasicConfig(userOptions = {}) {
4444
dir: opts.outputDir,
4545
plugins: [
4646
// build to js supported by modern browsers
47-
babel.generated(babelConfigRollupGenerate),
47+
getBabelOutputPlugin(babelConfigRollupGenerate),
4848
// create babel-helpers chunk based on es5 build
4949
bundledBabelHelpers({ minify: !developmentMode }),
5050
],
@@ -84,11 +84,11 @@ function createBasicConfig(userOptions = {}) {
8484
assetFileNames: `nomodule-${assetName}`,
8585
plugins: [
8686
// buid to es5
87-
babel.generated(babelConfigLegacyRollupGenerate),
87+
getBabelOutputPlugin(babelConfigLegacyRollupGenerate),
8888
// create babel-helpers chunk based on es5 build
8989
bundledBabelHelpers({ format: 'system', minify: !developmentMode }),
9090
// build to systemjs after helpers, so that helpers can be statically analyzed
91-
babel.generated(babelConfigSystemJs),
91+
getBabelOutputPlugin(babelConfigSystemJs),
9292
],
9393
},
9494
];

yarn.lock

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,16 +2584,16 @@
25842584
integrity sha512-BONpjHcGX2zFa9mfnwBCLEmlDsOHzT+j6Qt1yfK3MzFXFtAykfzFjAgaxPetu0YbBlCfXuMlfxI4vlRGCGMvFg==
25852585

25862586
"@open-wc/testing-karma-bs@file:./packages/testing-karma-bs":
2587-
version "1.3.85"
2587+
version "1.3.87"
25882588
dependencies:
2589-
"@open-wc/testing-karma" "^4.0.0"
2589+
"@open-wc/testing-karma" "^4.0.2"
25902590
"@types/node" "^11.13.0"
25912591
karma-browserstack-launcher "^1.0.0"
25922592

25932593
"@open-wc/testing-karma@file:./packages/testing-karma":
2594-
version "4.0.0"
2594+
version "4.0.2"
25952595
dependencies:
2596-
"@open-wc/karma-esm" "^3.0.0"
2596+
"@open-wc/karma-esm" "^3.0.2"
25972597
"@types/karma" "^5.0.0"
25982598
"@types/karma-coverage-istanbul-reporter" "^2.1.0"
25992599
"@types/karma-mocha" "^1.3.0"
@@ -2619,6 +2619,14 @@
26192619
prop-types "^15.6.1"
26202620
react-lifecycles-compat "^3.0.4"
26212621

2622+
"@rollup/plugin-babel@^5.1.0":
2623+
version "5.1.0"
2624+
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.1.0.tgz#ad8b5803fa6e1feb0f168984edc040b90d966450"
2625+
integrity sha512-zXBEYmfiLAMvB+ZBa6m/q9hsQYAq1sUFdjuP1F6C2pf6uQcpHwAWQveZgzS63zXdKPUYHD3Dr7BhjCqcr0bbLw==
2626+
dependencies:
2627+
"@babel/helper-module-imports" "^7.7.4"
2628+
"@rollup/pluginutils" "^3.0.8"
2629+
26222630
"@rollup/plugin-commonjs@^11.1.0":
26232631
version "11.1.0"
26242632
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz#60636c7a722f54b41e419e1709df05c7234557ef"

0 commit comments

Comments
 (0)