Skip to content

Commit

Permalink
chore: fix babel config
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed May 26, 2020
1 parent c9fc59c commit 724a7fc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .babelrc

This file was deleted.

42 changes: 42 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
presets: [
['@babel/preset-env', {
corejs: 3,
useBuiltIns: 'usage',
targets: {
browsers: [
'last 2 versions',
'not ie >= 0',
'not ie_mob >= 0',
'not dead',
],
},
}],
'@babel/preset-react',
],
plugins: [
['@babel/plugin-transform-runtime', {
corejs: 3,
}],
['@babel/plugin-proposal-class-properties', {
loose: true,
}],
],
env: {
ie: {
presets: [
['@babel/preset-env', {
corejs: 3,
useBuiltIns: 'usage',
targets: {
browsers: [
'last 2 versions',
'ie >= 11',
'not dead',
],
},
}],
],
},
},
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"webpack-merge": "4.2.2"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.9.6",
"core-js": "^3.6.5",
"prop-types": "^15.7.2"
},
"scripts": {
Expand Down

0 comments on commit 724a7fc

Please sign in to comment.