This commit is contained in:
qsh
2023-03-21 00:53:28 +08:00
parent 953377e655
commit 955687d473
171 changed files with 7149 additions and 7341 deletions

View File

@@ -35,22 +35,21 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8086`,
target: `http://192.168.1.114:8086`,
// target: `http://vue.ruoyi.vip/prod-api/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
},
"/amap": {
target: "https://restapi.amap.com",
'/amap': {
target: 'https://restapi.amap.com',
changeOrigin: true,
ws: true,
pathRewrite: {
"^/amap": ""
'^/amap': ''
}
}
},
disableHostCheck: true
},
@@ -71,7 +70,7 @@ module.exports = {
}
},
externals: {
AMap: "AMap"
AMap: 'AMap'
},
plugins: [
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
@@ -106,10 +105,12 @@ module.exports = {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.use('script-ext-html-webpack-plugin', [
{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}
])
.end();
config.optimization.splitChunks({
chunks: 'all',
@@ -134,10 +135,10 @@ module.exports = {
}
}
});
config.optimization.runtimeChunk('single'), {
config.optimization.runtimeChunk('single', {
from: path.resolve(__dirname, './public/robots.txt'), // 防爬虫文件
to: './' // 到根目录下
};
});
});
}
};