加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
babel.config.js 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
renmaomin 提交于 2019-03-22 18:33 . update org pile to pile-ui
module.exports = function config(api) {
api.cache(false);
return {
env: {
development: {
presets: [
[
'@babel/preset-env',
{
modules: false,
useBuiltIns: 'entry',
corejs: 2,
debug: true,
},
],
'@babel/preset-react',
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-runtime',
'@babel/proposal-class-properties',
],
},
test: {
presets: [['@babel/preset-env'], '@babel/preset-react'],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-runtime',
'@babel/proposal-class-properties',
],
},
production: {
presets: [
[
'@babel/preset-env',
{
modules: false,
targets: {
browsers: [
'last 2 versions',
'safari >= 7',
'not ie < 9', // React doesn't support IE8 anyway
],
},
useBuiltIns: 'entry',
corejs: 2,
},
],
'@babel/preset-react',
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-runtime',
'@babel/proposal-class-properties',
],
},
},
};
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化