Commit 8fc1c52c authored by 郝聪敏's avatar 郝聪敏

fix: 修改打包名称

parent 218643a8
...@@ -38,7 +38,7 @@ router.beforeEach((to, from, next) => { ...@@ -38,7 +38,7 @@ router.beforeEach((to, from, next) => {
// 路由异常错误处理,尝试解析一个异步组件时发生错误,重新渲染目标页面 // 路由异常错误处理,尝试解析一个异步组件时发生错误,重新渲染目标页面
router.onError(error => { router.onError(error => {
console.log("router error:", error.message); console.log("router error:", error.message);
const pattern = /Loading chunk (\d)+ failed/g; const pattern = /Loading chunk/g;
const isChunkLoadFailed = error.message.match(pattern); const isChunkLoadFailed = error.message.match(pattern);
const targetPath = router.history.pending.fullPath; const targetPath = router.history.pending.fullPath;
if (isChunkLoadFailed) { if (isChunkLoadFailed) {
......
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
localStorage.remove(params.itype + "DetailFormData"); localStorage.remove(params.itype + "DetailFormData");
} else if (path === "/policy/detail" && params.orderNo) { } else if (path === "/policy/detail" && params.orderNo) {
pathObj = `${path}/${params.orderNo}`; pathObj = `${path}/${params.orderNo}`;
} else { } else if (path === "/user/family") {
pathObj = path; pathObj = path;
} }
......
...@@ -84,9 +84,12 @@ module.exports = { ...@@ -84,9 +84,12 @@ module.exports = {
config.optimization.runtimeChunk("single"); config.optimization.runtimeChunk("single");
return config; return config;
}, },
configureWebpack: config => { configureWebpack: {
// 添加sentry插件 plugins: [new SentryPlugin(SentryConfig)],
config.plugins.push(new SentryPlugin(SentryConfig)); output: {
filename: "js/[name].[chunkhash:5].js",
chunkFilename: "js/[name].[chunkhash:5].js"
}
}, },
lintOnSave: true, lintOnSave: true,
runtimeCompiler: false, // 是否使用包含运行时编译器的 Vue 构建版本 runtimeCompiler: false, // 是否使用包含运行时编译器的 Vue 构建版本
......
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