Add corejs: 3
, and pull out babel config from webpack config (#84)
* add `corejs: 3` and pull out babel config from webpack config * typo
This commit is contained in:
parent
44d47fecef
commit
adf353748e
1 changed files with 3 additions and 27 deletions
|
@ -19,33 +19,9 @@ module.exports = {
|
||||||
use: {
|
use: {
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
plugins: [
|
cacheDirectory: true,
|
||||||
'@babel/plugin-proposal-class-properties',
|
|
||||||
'@babel/plugin-syntax-dynamic-import',
|
// Babel configuration is in babel.config.js because jest requires it to be there.
|
||||||
'@babel/proposal-object-rest-spread',
|
|
||||||
'babel-plugin-typescript-to-proptypes',
|
|
||||||
],
|
|
||||||
presets: [
|
|
||||||
['@babel/preset-env', {
|
|
||||||
targets: {
|
|
||||||
chrome: 66,
|
|
||||||
firefox: 60,
|
|
||||||
edge: 42,
|
|
||||||
safari: 12,
|
|
||||||
},
|
|
||||||
modules: false,
|
|
||||||
debug: false,
|
|
||||||
useBuiltIns: 'usage',
|
|
||||||
shippedProposals: true,
|
|
||||||
}],
|
|
||||||
['@babel/preset-react', {
|
|
||||||
useBuiltIns: true,
|
|
||||||
}],
|
|
||||||
['@babel/typescript', {
|
|
||||||
allExtensions: true,
|
|
||||||
isTSX: true,
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Reference in a new issue