vue.config.js 672 B

123456789101112131415161718192021222324252627282930313233343536
  1. module.exports = {
  2. lintOnSave: true,
  3. productionSourceMap: false,
  4. chainWebpack: (config) => {
  5. //忽略的打包文件
  6. config.externals({
  7. 'vue': 'Vue',
  8. 'vue-router': 'VueRouter',
  9. 'vuex': 'Vuex',
  10. 'axios': 'axios',
  11. 'element-ui': 'ELEMENT',
  12. })
  13. const entry = config.entry('app')
  14. entry
  15. .add('babel-polyfill')
  16. .end()
  17. entry
  18. .add('classlist-polyfill')
  19. .end()
  20. entry
  21. .add('@/mock')
  22. .end()
  23. },
  24. devServer: {
  25. port: 1888,
  26. proxy: {
  27. '/api': {
  28. target: 'http://localhost',
  29. ws: true,
  30. pathRewrite: {
  31. '^/api': '/'
  32. }
  33. }
  34. }
  35. }
  36. }