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:
Michael Kochell 2020-02-06 07:09:11 -05:00 committed by GitHub
parent 44d47fecef
commit adf353748e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.
},
},
},