Commit d91b3f08 authored by 李驰骋's avatar 李驰骋

缓存调整

parent 075c3896
......@@ -7,6 +7,10 @@
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/>
<!-- 禁用缓存,解决企业微信缓存问题 -->
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<!-- 点击无高光 -->
<meta name="msapplication-tap-highlight" content="no" />
<!-- uc强制竖屏 -->
......
......@@ -24,7 +24,10 @@ export const globalRouter = [
{
path: '/ship-approval',
name: 'ShipApproval',
component: () => import('@/views/ship-approval/ShipApproval.vue')
component: () => import('@/views/ship-approval/ShipApproval.vue'),
meta: {
noCache: true // 标记为不缓存
}
},
{
path: '/invoice-occupancy-detail',
......
......@@ -28,6 +28,8 @@ module.exports = {
}
},
productionSourceMap: false,
// 文件名添加hash,避免企业微信缓存问题
filenameHashing: true,
configureWebpack: {
resolve: {
alias: {
......@@ -35,6 +37,11 @@ module.exports = {
'@img': path.resolve(__dirname, './src/assets/images')
}
},
plugins: []
plugins: [],
output: {
// 确保文件名包含hash
filename: process.env.NODE_ENV === 'production' ? 'js/[name].[contenthash:8].js' : 'js/[name].js',
chunkFilename: process.env.NODE_ENV === 'production' ? 'js/[name].[contenthash:8].js' : 'js/[name].js'
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment