add react and typescript
This commit is contained in:
@@ -22,8 +22,10 @@ module.exports = function(api) {
|
||||
{
|
||||
targets: {
|
||||
node: 'current'
|
||||
}
|
||||
}
|
||||
},
|
||||
modules: 'commonjs'
|
||||
},
|
||||
'@babel/preset-react'
|
||||
],
|
||||
(isProductionEnv || isDevelopmentEnv) && [
|
||||
'@babel/preset-env',
|
||||
@@ -34,7 +36,15 @@ module.exports = function(api) {
|
||||
modules: false,
|
||||
exclude: ['transform-typeof-symbol']
|
||||
}
|
||||
]
|
||||
],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
development: isDevelopmentEnv || isTestEnv,
|
||||
useBuiltIns: true
|
||||
}
|
||||
],
|
||||
['@babel/preset-typescript', { 'allExtensions': true, 'isTSX': true }]
|
||||
].filter(Boolean),
|
||||
plugins: [
|
||||
'babel-plugin-macros',
|
||||
@@ -56,7 +66,9 @@ module.exports = function(api) {
|
||||
[
|
||||
'@babel/plugin-transform-runtime',
|
||||
{
|
||||
helpers: false
|
||||
helpers: false,
|
||||
regenerator: true,
|
||||
corejs: false
|
||||
}
|
||||
],
|
||||
[
|
||||
@@ -64,7 +76,7 @@ module.exports = function(api) {
|
||||
{
|
||||
async: false
|
||||
}
|
||||
]
|
||||
],
|
||||
].filter(Boolean)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user