CyberFei / puzzle

A pluggable micro-frontend structure based on Vue and Webpack5. 基于 Vue 和 Webpack5 的可热插拔式微前端架构
MIT License
234 stars 51 forks source link

core.f5dcb2c61d39e134ede4.dll.js:7 ChunkLoadError: Loading chunk test/views/views-puzzlesDetail failed. #28

Open 15738039217 opened 3 years ago

15738039217 commented 3 years ago

(missing: http://localhost:8080/test/puzzles/test/views/views-puzzlesDetail.241ab6a9529a0243af03.js) 为什么组件js 文件的路径 会多一个一个路径呢,正常路径http://localhost:8080/puzzles/test/views/views-puzzlesDetail.241ab6a9529a0243af03.js),

CyberFei commented 3 years ago

不太清楚,这个应该和你的配置有关系

15738039217 commented 3 years ago

谢谢了,但是能指导一下 项目修改成  路由mode: "history", 的一个思路嘛,目前修改的是 router.js// 创建一个路由器实例 const router = new VueRouter({ mode: "history", // base: "", routes: [], // 设置滚动条位置 scrollBehavior: to => { if (document.getElementById("con")) { if (to.meta.scrollTop) document.getElementById("con").scrollTop = to.meta.scrollTop; else document.getElementById("con").scrollTop = 0; } } });// history 模式 historyApiFallback: { index: "/index.html" }打包后部署到环境,总是找不到 js模块,似乎部署的路径 和项目文件路径有关系,

------------------ 原始邮件 ------------------ 发件人: "CyberFei/puzzle" <notifications@github.com>; 发送时间: 2020年11月6日(星期五) 下午2:01 收件人: "CyberFei/puzzle"<puzzle@noreply.github.com>; 抄送: "梦什么想"<1693885383@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [CyberFei/puzzle] core.f5dcb2c61d39e134ede4.dll.js:7 ChunkLoadError: Loading chunk test/views/views-puzzlesDetail failed. (#28)

不太清楚,这个应该和你的配置有关系

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

CyberFei commented 3 years ago

history目前好像有点问题,我抽时间会找一下原因