mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
38 lines
875 B
JavaScript
38 lines
875 B
JavaScript
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()];
|