Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vuepress 升级 2.x #100

Open
cyio opened this issue Mar 22, 2022 · 0 comments
Open

vuepress 升级 2.x #100

cyio opened this issue Mar 22, 2022 · 0 comments

Comments

@cyio
Copy link
Owner

cyio commented Mar 22, 2022

https://v2.vuepress.vuejs.org/reference/config.html

无法访问 $site.pages

vuejs/vuepress#2689 (comment)

支持 v2 的 blog plugin
https://github.com/vuepress-theme-hope/vuepress-theme-hope/blob/main/packages/blog2/src/client/composables/useBlogCategory.ts

使用说明
https://vuepress-theme-hope.gitee.io/v2/blog/zh/

其他插件,依然是 1.x
https://github.com/xugaoyi/vuepress-theme-vdoing/blob/master/docs/.vuepress/config.ts

解析bug
<li>指定折叠<code>{{{1</code></li> 多个大括号

-origin \<a download>\. C 文本存在尖括号

Vuepress2.x 编译报错 TypeError: Invalid value used as weak map key_AvatarGiser的博客-CSDN博客

官方配置
https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/config.ts

build: TypeError: Invalid value used as weak map key
image
在报错处,打 log,可看出还是解析 tag 开发模式与构建模式存在差异,开发模式进行了替换,实际是不存在的组件。控制台有警告,但很难察觉。
[Vue warn]: Failed to resolve component

if (!raw && !hasExtends) {
    console.log('debug', comp)
    cache.set(comp, shared.EMPTY_ARR);
    return shared.EMPTY_ARR;
}

博客相关
https://v2.vuepress.vuejs.org/guide/page.html#routing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant