Files
cmanager/vue.config.js

49 lines
1.1 KiB
JavaScript
Raw Normal View History

2024-02-02 15:04:47 +08:00
module.exports = {
2024-10-09 09:39:34 +08:00
configureWebpack: {
devtool: 'source-map'
},
2024-02-02 15:04:47 +08:00
//路径前缀
2024-04-17 20:47:32 +08:00
publicPath: "/manage/",
2024-03-15 10:24:46 +08:00
outputDir: "manage",
2024-02-02 15:04:47 +08:00
lintOnSave: true,
productionSourceMap: false,
chainWebpack: config => {
2024-05-30 15:36:10 +08:00
config.plugins.delete('case-sensitive-paths')
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": {
2025-11-03 16:53:20 +08:00
target: 'http://192.168.3.11:8000',
// target: 'http://10.165.0.173:8000',
2024-02-02 15:04:47 +08:00
ws: true,
changeOrigin: true,
2024-02-02 15:04:47 +08:00
pathRewrite: {
2024-05-06 17:47:14 +08:00
'^/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
}
}
}
}
};