You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
const { defineConfig } = require("@vue/cli-service");
|
|
|
|
|
module.exports = defineConfig({
|
|
|
|
|
transpileDependencies: true,
|
|
|
|
|
publicPath: "/", //这个必须,引入静态资源需要从根路径引入,否则会找不到静态资源
|
|
|
|
|
devServer: {
|
|
|
|
|
// history模式下的url会请求到服务器端,但是服务器端并没有这一个资源文件,就会返回404,所以需要配置这一项
|
|
|
|
|
historyApiFallback: {
|
|
|
|
|
index: "/index.html", //与output的publicPath
|
|
|
|
|
},
|
|
|
|
|
host: "localhost",
|
|
|
|
|
port: 8080, // 端口号
|
|
|
|
|
https: false, // https:{type:Boolean}
|
|
|
|
|
open: false, // 配置后自动启动浏览器
|
|
|
|
|
proxy: {
|
|
|
|
|
// 跨域处理
|
|
|
|
|
"/api": {
|
|
|
|
|
target: "http://47.105.55.218:9090/", //目标接口域名
|
|
|
|
|
changeOrigin: true, //是否跨域
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// "/AMS": {
|
|
|
|
|
// target: "http://60.209.125.238:35105", //目标接口域名
|
|
|
|
|
// changeOrigin: true, //是否跨域
|
|
|
|
|
// pathRewrite: {
|
|
|
|
|
// "^/AMS": "", //重写接口
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|