babel.config.js 783 B

12345678910111213141516171819202122
  1. // let transformRemoveConsolePlugin = [];
  2. // // 生产环境清除console.log的信息
  3. // if (process.env.NODE_ENV != "development") {
  4. // transformRemoveConsolePlugin = ["transform-remove-console"];
  5. // }
  6. module.exports = {
  7. presets: [
  8. // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
  9. '@vue/cli-plugin-babel/preset'
  10. ],
  11. 'env': {
  12. 'development': {
  13. // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
  14. // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
  15. 'plugins': ['dynamic-import-node']
  16. }
  17. }
  18. // plugins: [
  19. // ...transformRemoveConsolePlugin
  20. // ]
  21. }