vue.config.js 374 B

12345678910111213141516
  1. const { defineConfig } = require("@vue/cli-service");
  2. module.exports = defineConfig({
  3. publicPath: "./",
  4. devServer: {
  5. proxy: {
  6. "/api": {
  7. target: "http://192.168.0.91:8081/demo/wx", // 后端接口
  8. changeOrigin: true, // 是否跨域
  9. pathRewrite: {
  10. "/api": "",
  11. },
  12. },
  13. },
  14. },
  15. transpileDependencies: true,
  16. });