Files
cmanager/vue.config.js
2024-03-18 21:15:52 +08:00

48 lines
1.2 KiB
JavaScript

module.exports = {
//路径前缀
publicPath: "/manage/",
outputDir: "manage",
lintOnSave: true,
productionSourceMap: false,
chainWebpack: config => {
//忽略的打包文件
config.externals({
vue: "Vue",
"vue-router": "VueRouter",
vuex: "Vuex",
axios: "axios",
"element-ui": "ELEMENT"
});
const entry = config.entry("app");
entry.add("babel-polyfill").end();
entry.add("classlist-polyfill").end();
entry.add("@/mock").end();
},
devServer: {
host: "0.0.0.0",
port: 1888,
proxy: {
"/api": {
// target: 'http://localhost:8000', // 本地服务接口地址
// target: "http://39.98.184.58:8000", // 阿里云后台地址
// target: "http://192.168.3.104:8000", // 本地
// target: 'http://192.168.3.111:8000',
target: 'http://192.168.3.108:8000',
ws: true,
changeOrigin: true,
pathRewrite: {
"^/api": "/"
}
},
"/qq/map": {
//本地服务接口地址
target: "https://apis.map.qq.com",
ws: true,
pathRewrite: {
"^/qq/map": "/"
}
}
}
}
};