babel.config.js 580 B

12345678910111213141516171819
  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. plugins: [
  7. '@babel/plugin-syntax-import-meta'
  8. ],
  9. 'env': {
  10. 'development': {
  11. // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
  12. // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
  13. 'plugins': [
  14. 'dynamic-import-node',
  15. '@babel/plugin-syntax-import-meta'
  16. ]
  17. }
  18. }
  19. }