Skip to content

Commit d2baf04

Browse files
authored
Babel plugins: remove outdated proposals (#1074)
* Babel plugins: remove outdated proposals - Also updates the browserlist to be more succint. - Also migrates from rollup-plugin-babel --> @rollup/plugin-babel * Update rollup.plugins.js * revert browserlist jic
1 parent c1d49b1 commit d2baf04

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

config/rollup.plugins.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import babel from 'rollup-plugin-babel';
17+
import babel from '@rollup/plugin-babel';
1818
import MagicString from 'magic-string';
1919
import fs from 'fs';
2020
import * as path from 'path';
@@ -32,6 +32,7 @@ export function babelPlugin({ transpileToES5, allowConsole = false, allowPostMes
3232
const exclude = allowConsole ? ['error', 'warn', 'trace', 'info', 'log', 'time', 'timeEnd'] : [];
3333

3434
return babel({
35+
babelHelpers: 'bundled',
3536
exclude: 'node_modules/**',
3637
presets: [
3738
[
@@ -45,8 +46,6 @@ export function babelPlugin({ transpileToES5, allowConsole = false, allowPostMes
4546
],
4647
],
4748
plugins: [
48-
['@babel/plugin-proposal-object-rest-spread'],
49-
['@babel/proposal-class-properties'],
5049
[
5150
'babel-plugin-minify-replace',
5251
{

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141
"@ampproject/rollup-plugin-closure-compiler": "0.26.0",
4242
"@babel/cli": "7.14.5",
4343
"@babel/core": "7.14.6",
44-
"@babel/plugin-proposal-class-properties": "7.14.5",
45-
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
4644
"@babel/preset-env": "7.14.7",
45+
"@rollup/plugin-babel": "5.3.0",
4746
"@rollup/plugin-replace": "2.4.2",
4847
"@types/node": "14.17.3",
4948
"@types/sinon": "10.0.2",

0 commit comments

Comments
 (0)