vue.config.js 716 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * 配置参考:
  3. * https://cli.vuejs.org/zh/config/
  4. */
  5. const url = 'http://pigx-gateway:9999'
  6. module.exports = {
  7. lintOnSave: true,
  8. productionSourceMap: false,
  9. chainWebpack: config => {
  10. // 忽略的打包文件
  11. config.externals({
  12. 'axios': 'axios'
  13. })
  14. const entry = config.entry('app')
  15. entry
  16. .add('babel-polyfill')
  17. .end()
  18. entry
  19. .add('classlist-polyfill')
  20. .end()
  21. },
  22. // 配置转发代理
  23. devServer: {
  24. disableHostCheck: true,
  25. port: 8080,
  26. proxy: {
  27. '/': {
  28. target: url,
  29. ws: false, // 需要websocket 开启
  30. pathRewrite: {
  31. '^/': '/'
  32. }
  33. }
  34. // 3.5 以后不需要再配置
  35. }
  36. }
  37. }