Skip to content

Commit e897639

Browse files
Merge pull request LucasBassetti#198 from pascalgagneur/babelify-object-assign
Added babel transform for Object.assign
2 parents 7389596 + 8cd37ca commit e897639

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const presets = ['@babel/env', '@babel/preset-react'];
22
const plugins = [
33
'@babel/plugin-transform-arrow-functions',
44
'@babel/plugin-proposal-class-properties',
5+
'@babel/plugin-transform-object-assign'
56
];
67

78
module.exports = { presets, plugins };

package-lock.json

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@babel/core": "^7.1.2",
5555
"@babel/plugin-proposal-class-properties": "^7.1.0",
5656
"@babel/plugin-transform-arrow-functions": "^7.0.0",
57+
"@babel/plugin-transform-object-assign": "^7.2.0",
5758
"@babel/preset-env": "^7.1.0",
5859
"@babel/preset-react": "^7.0.0",
5960
"@babel/register": "^7.0.0",

webpack.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ module.exports = {
2424
test: /\.jsx?$/,
2525
exclude: /(node_modules|bower_components)/,
2626
use: {
27-
loader: 'babel-loader',
28-
options: {
29-
presets: ['@babel/preset-env'],
30-
plugins: [
31-
'@babel/plugin-transform-arrow-functions',
32-
'@babel/plugin-proposal-class-properties',
33-
],
34-
},
27+
loader: 'babel-loader'
3528
},
3629
},
3730
],

webpack.config.prod.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@ module.exports = {
3434
test: /\.jsx?$/,
3535
exclude: /(node_modules|bower_components)/,
3636
use: {
37-
loader: 'babel-loader',
38-
options: {
39-
presets: ['@babel/preset-env'],
40-
plugins: [
41-
'@babel/plugin-transform-arrow-functions',
42-
'@babel/plugin-proposal-class-properties',
43-
],
44-
},
37+
loader: 'babel-loader'
4538
},
4639
},
4740
],

0 commit comments

Comments
 (0)