1 Star 0 Fork 327

damone/smart-flow-design

forked from GunsFlow/smart-flow-design 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
babel.config.js 793 Bytes
一键复制 编辑 原始数据 按行查看 历史
GunsFlow 提交于 2022-04-20 19:39 . 第一次提交
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
const plugins = []
if (IS_PROD) {
// 用babel-plugin-transform-remove-console插件实现在开发环境可以用console在生产环境去掉
plugins.push('transform-remove-console')
}
// 这个插件主要作用是用来编译类的
plugins.push('@babel/plugin-proposal-class-properties');
// lazy load ant-design-vue
// if your use import on Demand, Use this code
plugins.push([
'import',
{
libraryName: 'ant-design-vue',
libraryDirectory: 'es',
style: true, // `style: true` 会加载 less 文件
},
]);
module.exports = {
presets: [
'@vue/app',
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
corejs: 3,
},
],
],
// 按需加载
plugins,
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/damone/smart-flow-design.git
git@gitee.com:damone/smart-flow-design.git
damone
smart-flow-design
smart-flow-design
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385