Skip to content

Commit

Permalink
Merge pull request LucasBassetti#198 from pascalgagneur/babelify-obje…
Browse files Browse the repository at this point in the history
…ct-assign

Added babel transform for Object.assign
  • Loading branch information
LucasBassetti authored Apr 3, 2019
2 parents 7389596 + 8cd37ca commit e897639
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const presets = ['@babel/env', '@babel/preset-react'];
const plugins = [
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-object-assign'
];

module.exports = { presets, plugins };
11 changes: 10 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-transform-arrow-functions": "^7.0.0",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.0.0",
Expand Down
9 changes: 1 addition & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ module.exports = {
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-proposal-class-properties',
],
},
loader: 'babel-loader'
},
},
],
Expand Down
9 changes: 1 addition & 8 deletions webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ module.exports = {
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-proposal-class-properties',
],
},
loader: 'babel-loader'
},
},
],
Expand Down

0 comments on commit e897639

Please sign in to comment.