vue.config.js 430 B

1234567891011121314151617
  1. const { defineConfig } = require('@vue/cli-service')
  2. module.exports = defineConfig({
  3. transpileDependencies: true
  4. })
  5. module.exports = {
  6. devServer: {
  7. proxy: {
  8. '/api': {
  9. target: 'http://8.142.173.95:9527', // 设置你的后端 API 地址
  10. changeOrigin: true, // 允许跨域
  11. // pathRewrite: {
  12. // '^/api': '', // 重写请求路径,去掉 '/api'
  13. // },
  14. },
  15. },
  16. },
  17. };