vuejs/vuepress

刷新部分子页面报错并卡死网页

Bayn-Web opened this issue · 3 comments

"vuepress": "^1.9.9"
"@vue/cli-plugin-typescript": "^5.0.8",
"@vuepress/client": "^2.0.0-beta.12",
"@vuepress/plugin-register-components": "^1.9.9",
"vuepress-plugin-typescript": "^0.3.1"

我一直在用vuepress做个人组件,直到有一天发现一个子页面刷新后会卡住页面,想着找个时间解决,然后改着改着发现全部子页面都出现这个问题了,只要域名如:5500/b_layout/scroll.html#代码类似的子页面都会出现刷新后卡住不能动的情况,试错发现很困难,目前只改好了一点,这是错误的网址:https://bcomponent.vercel.app/ 这个项目源代码就这这个账号的仓库中,麻烦大家帮忙看看,似乎是和服务端渲染有关。
报错正文:DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.

如果删掉所有的代码段 如JavaScript 这样会有效,但我需要这些代码段

文档中提到了
<<< @/docs/.vuepress/components/scroll.vue
这个方法似乎也一样不行

在md用到的组件外加ClientOnly标签是一个可行的方案