選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

babel.config.js 703B

123456789101112131415161718192021
  1. const prodPlugins=[]
  2. if(process.env.NODE_ENV=='production'){
  3. prodPlugins.push('transform-remove-console')
  4. }
  5. module.exports = {
  6. presets: [
  7. // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
  8. '@vue/cli-plugin-babel/preset'
  9. ],
  10. plugins:[
  11. ...prodPlugins
  12. ],
  13. 'env': {
  14. 'development': {
  15. // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
  16. // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
  17. // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
  18. 'plugins': ['dynamic-import-node']
  19. }
  20. }
  21. }