Skip to content

Commit

Permalink
babel in rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 3, 2020
1 parent cb4d182 commit d172cce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let presets = [
}]
];

let plugins = [];
let plugins = ["@babel/plugin-proposal-optional-chaining"];

if (process.env.BABEL_ENV === "development") {
plugins.push("@babel/plugin-transform-modules-commonjs");
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-css-only": "^2.1.0",
"rollup-plugin-execute": "^1.1.1",
"rollup-plugin-babel": "^4.4.0",
"csso-cli": "^3.0.0",
"shx": "^0.3.2",
"@babel/core": "^7.10.1",
"@babel/cli": "^7.10.1",
"@babel/preset-env": "^7.10.1"
"@babel/preset-env": "^7.10.1",
"@babel/plugin-proposal-optional-chaining": "7.10.1"
},
"engines": {
"atom": ">=1.20.0"
Expand Down
2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import commonjs from '@rollup/plugin-commonjs';
import {terser} from 'rollup-plugin-terser';
import css from 'rollup-plugin-css-only';
import execute from 'rollup-plugin-execute';
import babel from 'rollup-plugin-babel';

let plugins = [
babel(),

// so Rollup can find externals
resolve({extensions: ['.js'], preferBuiltins: true}),
Expand Down

0 comments on commit d172cce

Please sign in to comment.