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.
 
 
 
 

43 lines
981 B

  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. },
  34. '/yd-monitor': {
  35. target: 'http://192.168.1.18:8080/' // 开发地址
  36. },
  37. '/ureport': {
  38. target: 'http://india.mes.picaiba.com/' // ureporter
  39. }
  40. }
  41. }
  42. }