Files
cmanager/vue.config.js

45 lines
985 B
JavaScript
Raw Normal View History

2024-02-02 15:04:47 +08:00
module.exports = {
//路径前缀
2025-03-26 14:52:22 +08:00
publicPath: '/gt/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-04-01 16:38:47 +08:00
target: 'http://39.98.44.136:8082',
2024-02-02 15:04:47 +08:00
ws: true,
changeOrigin: true,
2025-04-01 16:38: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
}
}
}
}
};