Closed cloakscn closed 2 years ago
已经检查过了,确实是因为使用了mathjax3插件引起报错的
可以通过yarn dev运行,但是yarn build报这个错了
@cloakscn 你这个问题,我之前已经询问过 @tani 了,详情请看 #52 。
目前 VuePress v2.x 仍处于 Beta 状态,在其转入 Stable 状态彻底替代 v1.x 之前,@tani 都将不会考虑为 v2.x 提供技术支持。
最后需要提一下,尽管 @tani 学过一段时间的汉语,基本具备无障碍阅读我们对话的能力,但可能还有其他语言的用户会找到这里。使用英语会方便其他用户在 Issues / Pull Requests 中进行搜索,极大程度杜绝重复提问。因此请考虑使用纯英语或中英双语发言。
Deprecated #52. This issue can be closed.
@Dragon1573 Thank you for answering this issue to him.
You (@Dragon1573 and @cloakscn ) might know, vuepress is in maintenance mode. It means that we may not able to use vuepress v2 anymore. So, I have no motivation to support vuepress v2 in the future. https://github.com/vuejs/vuepress#status
Vitepress is the successor of vuepress. It is still in alpha quality in v0. I do not recommend using it in production but I can work to solve some problems for vitepress and cannot work to solve some problems for vuepress v2.
Cheers.
This works nice with VitePress (https://github.com/vuejs/vitepress/issues/529#issuecomment-1162767122) without much config. 🙌
vuepress2.0+ , You can configure it this way and it will work fine @cloakscn @Dragon1573
// config.js
const customElement = [
"math",
"annotation",
"semantics",
"mtext",
"mn",
"mo",
"mi",
"mspace",
"mover",
"munder",
"munderover",
"msup",
"msub",
"msubsup",
"mfrac",
"mroot",
"msqrt",
"mtable",
"mtr",
"mtd",
"mlabeledtr",
"mrow",
"menclose",
"mstyle",
"mpadded",
"mphantom",
"mglyph",
"mjx-container",
"mjx-assistive-mml",
];
extendsMarkdown: (md) => {
md.use(require("markdown-it-mathjax3"));
md.linkify.set({ fuzzyEmail: false });
},
bundlerConfig: {
vuePluginOptions: {
template: {
compilerOptions: {
isCustomElement: (tag) => customElement.includes(tag),
},
},
},
},