babel.config.js 544 B

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