健康同学微信公众号h5项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

babel.config.js 481B

11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
1234567891011121314151617181920212223
  1. // 获取 VUE_APP_ENV 非 NODE_ENV,测试环境依然 console
  2. const IS_PROD = ['production', 'prod'].includes(process.env.VUE_APP_ENV);
  3. const plugins = [
  4. [
  5. 'import',
  6. {
  7. libraryName: 'vant',
  8. libraryDirectory: 'es',
  9. style: true
  10. },
  11. 'vant'
  12. ]
  13. ];
  14. // 去除 console.log
  15. if (IS_PROD) {
  16. plugins.push('transform-remove-console');
  17. }
  18. module.exports = {
  19. presets: [['@vue/cli-plugin-babel/preset', { useBuiltIns: 'usage', corejs: 3 }]],
  20. plugins
  21. };