vue.config.js 557 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://2.142.215.98:8010',//生产环境
  11. //target: 'http://192.168.139.90:8084',//开发环境
  12. changeOrigin: true,
  13. pathRewrite: {
  14. '^/api': '/'
  15. }
  16. }
  17. }
  18. },
  19. })