vue.config.js 611 B

1234567891011121314151617181920212223
  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://2.142.215.98:8010
  11. // target: 'http://192.168.139.9:8084',
  12. target: 'http://2.142.215.98:8010',
  13. changeOrigin: true,
  14. pathRewrite: {
  15. '^/api': '/'
  16. }
  17. }
  18. }
  19. },
  20. })