Skip to content

Commit

Permalink
Also include stage-3 as supported language features and fix Babel con…
Browse files Browse the repository at this point in the history
…figurations 👩‍🌾
  • Loading branch information
pirelenito committed Apr 7, 2017
1 parent cb6b027 commit c91c96b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": ["sagui"]
"presets": [
"stage-3",
["env", {
"targets": {
"node": 4
}
}]
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"babel-plugin-react-transform": "^2.0.2",
"babel-preset-env": "^1.3.3",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"chalk": "^1.1.3",
"clean-webpack-plugin": "^0.1.16",
"commander": "^2.9.0",
Expand Down
15 changes: 10 additions & 5 deletions src/configure-webpack/loaders/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ export default {
path: 'babel-loader',
query: {
babelrc: false,
// Replaces require("babel-polyfill")
// with only the polyfills you need
// for the target browsers
useBuiltIns: true,
presets: [require.resolve('babel-preset-env'), require.resolve('babel-preset-react')],
presets: [
[require.resolve('babel-preset-env'), {
// Replaces require("babel-polyfill")
// with only the polyfills you need
// for the target browsers
useBuiltIns: true
}],
require.resolve('babel-preset-react'),
require.resolve('babel-preset-stage-3')
],
plugins: babelPlugins(action, coverage)
}
}]
Expand Down

0 comments on commit c91c96b

Please sign in to comment.