babel.config.js 736 B

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