Closed pengzhanbo closed 2 months ago
I believe this issue is related to vite, as I can trigger similar issue on a normal HMR of .vue
component
我尝试在 vuepress 旧版本中重现该问题,发现在 rc.7
之前的版本无该问题,从 rc.8
开始出现该问题,
v2.0.0-rc.7...v2.0.0-rc.8 在 diff 中也未发现 潜在的引发该问题的代码修改。
在这两个版本之间,vite 版本 确实发生了 更新 , 因此我相信 该问题跟 vite 有关 是对的。
bundler: viteBundler({
viteOptions: {
server: {
fs: {
cachedChecks: false,
},
},
},
}),
Ref: https://github.com/vitejs/vite/issues/15784#issuecomment-1923683823
I just tried the snippet above in your repro link, and it's working well then. Not sure if we should set it as the default in bundler-vite
pkg
I think we should set it as default value
bundler: viteBundler({ viteOptions: { server: { fs: { cachedChecks: false, }, }, }, }),
Ref: vitejs/vite#15784 (comment)
I just tried the snippet above in your repro link, and it's working well then. Not sure if we should set it as the default in
bundler-vite
pkg
I have an issue in dev mode.
I added the code above, as well as import { viteBundler } from '@vuepress/bundler-vite'
into theme.ts, it fixed the problem until I added new media again. After that, I just need to save the config.ts ts again (with no changes), so VScode restarts dev mode and problem fixes again.
theme.ts
Are you sure you are doing the correct thing?
theme.ts
Are you sure you are doing the correct thing?
I actually have no idea, sorry, I have no idea how Vue actually works and I have 0 programming experience
Description
启动开发服务后,对 markdown 文件
frontmatter
字段的permalink
进行修改,保存文件后,均会导致错误。错误信息:
在重现中,修改
docs/permalink.md
文件即可重现该问题。Reproduction
https://stackblitz.com/edit/vuepress-lc5skn?file=docs%2FREADME.md
Used Package Manager
pnpm
System Info