Files
cmanager/vue.config.js

47 lines
1.1 KiB
JavaScript
Raw Normal View History

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