-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
升级到4.x版本后,md中注释报错 #113
Comments
原先有大约50个组件,当我删除大量的组件,只保留了几个测试,就能正常访问页面了,但是感觉速度还是会有几百毫秒的延迟,所以,哪一个环节出了问题? |
有可能是v4版本升级到了mdx2.x导致的,我调查一下,谢谢反馈 |
在mdx v2版本,它抛弃了对HTML注释语法的支持,文档推荐使用jsx的注释语法:
关于mdx v2为什么要移除掉html注释语法的支持,作者在 mdx-js/mdx#1042 (comment) 解释了原因。作者希望mdx语法纯粹由md语法+JSX语法组成,引入HTML语法会增加心智负担。
mdx v2移除掉html注释语法确实带来了一些迁移成本,你可以通过正则搜索替换来快速修改: 已经在迁移文档中增加说明:9750ccd |
使用的官网提供的demo,只修改了 src文件夹 和 package.json文件
demo
The text was updated successfully, but these errors were encountered: