Files
cmanager/vue.config.js

44 lines
930 B
JavaScript
Raw Normal View History

2024-02-02 15:04:47 +08:00
module.exports = {
//路径前缀
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-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-28 14:25:43 +08:00
target: 'http://localhost: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
}
}
}
}
};