You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

46 lines
1.1 KiB

  1. /**
  2. * 配置参考: https://cli.vuejs.org/zh/config/
  3. */
  4. module.exports = {
  5. publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  6. chainWebpack: config => {
  7. const svgRule = config.module.rule('svg')
  8. svgRule.uses.clear()
  9. svgRule
  10. .test(/\.svg$/)
  11. .use('svg-sprite-loader')
  12. .loader('svg-sprite-loader')
  13. },
  14. productionSourceMap: false,
  15. configureWebpack: config => {
  16. if (process.env.NODE_ENV === 'production') {
  17. config.performance = {
  18. maxEntrypointSize: 2097152, // 大小改为2mb
  19. maxAssetSize: 1572864
  20. }
  21. }
  22. },
  23. devServer: {
  24. open: true,
  25. port: 8001,
  26. overlay: {
  27. errors: true,
  28. warnings: true
  29. },
  30. proxy: {
  31. '/api': {
  32. // target: 'http://india.mes.picaiba.com/'
  33. target: 'http://127.0.0.1:8080/'
  34. },
  35. '/yd-monitor': {
  36. // target: 'http://192.168.1.18:8080/' // 开发地址
  37. target: 'http://127.0.0.1:8080/'
  38. },
  39. '/ureport': {
  40. // target: 'http://india.mes.picaiba.com/' // ureporter
  41. target: 'http://127.0.0.1:8080/'
  42. }
  43. }
  44. }
  45. }