vue.config.js 465 B

12345678910111213141516171819202122
  1. const { defineConfig } = require('@vue/cli-service')
  2. module.exports = defineConfig({
  3. transpileDependencies: true,
  4. publicPath:'./',
  5. // 代理服务,处理接口跨域请求
  6. devServer:{
  7. port:'8080',
  8. proxy:{
  9. '/api':{
  10. target:'http://124.70.137.152:8095',// http://124.70.137.152:8095
  11. //target:'http://localhost:8084',//
  12. changeOrigin:true,
  13. pathRewrite:{
  14. '^/api':'/'
  15. }
  16. }
  17. }
  18. },
  19. })