代码拉取完成,页面将自动刷新
var path = require("path");
module.exports = {
filenameHashing: true,
// webpack配置
devServer: {
open: true,
port: 8082,
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://localhost:8088',
ws: true,
changeOrigin: true,
pathRewrite: {
'^/api/': '/api/'
}
},
}
},
configureWebpack:function(config){
const externals = {
AMap: "AMap"
};
},
chainWebpack:function (config) {
config.plugin("html").tap(args => {
const cdn = {
// 开发环境
dev: {
css: [],
js: [
"https://webapi.amap.com/maps?v=1.4.13&key=209e57a8bf80dd59da2650f389a2b6c5",
"//webapi.amap.com/ui/1.0/main.js"
]
},
build: {
css: [],
js: [
"https://webapi.amap.com/maps?v=1.4.13&key=209e57a8bf80dd59da2650f389a2b6c5",
"//webapi.amap.com/ui/1.0/main.js"
]
}
};
if (process.env.NODE_ENV === "production") {
args[0].cdn = cdn.build;
}
if (process.env.NODE_ENV === "development") {
args[0].cdn = cdn.dev;
}
return args;
})
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。