44 Star 737 Fork 297

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,
};
JavaScript
1
https://gitee.com/crowncloud/smart-flow-design.git
git@gitee.com:crowncloud/smart-flow-design.git
crowncloud
smart-flow-design
smart-flow-design
master

搜索帮助