123456789101112131415161718 |
- const { defineConfig } = require('@vue/cli-service')
- module.exports = defineConfig({
- transpileDependencies: true,
- devServer: {
- host: 'localhost', // 本地地址
- port: 8081, // 端口号
- open: true, // 配置项目在启动时自动在浏览器打开
- proxy: {
- '/appointment' : { // '/api'是代理标识,一般是每个接口前的相同部分
- target: "http://114.135.61.186:8339", // 请求地址,一般是服务器地址
- changeOrigin: true, // 是否进行跨域
- pathRewrite: { // pathRewrite的作用是把请求接口中的 '/api'替换掉,一般是替换为空""
-
- }
- }
- }
- }
- })
|