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: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'@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,
|
||||
}],
|
||||
],
|
||||
cacheDirectory: true,
|
||||
|
||||
// Babel configuration is in babel.config.js because jest requires it to be there.
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Reference in a new issue