vue.config.js 733B

1234567891011121314151617181920212223
  1. module.exports = {
  2. baseUrl: './',
  3. // 生产环境是否生成 sourceMap 文件
  4. productionSourceMap: true,
  5. chainWebpack: config => config.plugins.delete('named-chunks'),
  6. devServer: {
  7. proxy: {
  8. '/api': {
  9. target: 'http://wechatconfigdev.ycjcjy.com',
  10. // target: 'http://192.168.0.62:8080', // wf
  11. // target: 'http://192.168.0.102:8080', // hyq
  12. // target: 'http://192.168.0.11', // zys
  13. // target: 'http://dev.ycjcjy.com', // frp
  14. changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
  15. // pathRewrite: {
  16. // '^/api': '/api-v2/api'
  17. // },
  18. },
  19. },
  20. // compress: true,
  21. disableHostCheck: true, // That solved it
  22. }
  23. }