mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-24 14:04:07 +08:00
Update Babel config
This commit is contained in:
parent
8ed5ea6fc5
commit
ae7639c1d4
29
.babelrc
29
.babelrc
@ -1,29 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"modules": false,
|
||||
"useBuiltIns": false,
|
||||
"loose": true
|
||||
}]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-syntax-dynamic-import",
|
||||
["@babel/plugin-transform-runtime", {
|
||||
"helpers": true,
|
||||
"regenerator": true
|
||||
}]
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": { "node": "current" },
|
||||
"ignoreBrowserslistConfig": true
|
||||
}]
|
||||
],
|
||||
"plugins": [
|
||||
"babel-plugin-dynamic-import-node"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +1,4 @@
|
||||
> 1%
|
||||
not dead
|
||||
not ie 11
|
||||
Chrome > 52
|
||||
|
37
babel.config.js
Normal file
37
babel.config.js
Normal file
@ -0,0 +1,37 @@
|
||||
module.exports = api => ({
|
||||
production: {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
useBuiltIns: false,
|
||||
loose: true
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
['@babel/plugin-transform-runtime', {
|
||||
helpers: true,
|
||||
regenerator: true
|
||||
}]
|
||||
]
|
||||
},
|
||||
development: {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
targets: { esmodules: true }
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
]
|
||||
},
|
||||
test: {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
targets: { node: 'current' }
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'babel-plugin-dynamic-import-node'
|
||||
]
|
||||
},
|
||||
})[api.env()];
|
@ -42,14 +42,7 @@ const config = {
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
'cache-loader',
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
plugins: [
|
||||
'@babel/plugin-transform-async-to-generator'
|
||||
]
|
||||
}
|
||||
}
|
||||
'babel-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user