Open iicdii opened 9 months ago
I have same error, but resolve it finally. You can try my config.
package.json
{
"peerDependencies": {
"parse5": "^6.0.1"
},
"devDependencies": {
"rehype-katex": "^6.0.3",
"rehype-raw": "^6.1.1",
"remark-gemoji": "^8.0.0",
"remark-math": "^5.1.1",
}
}
rspress.config.ts
import rehypeKatex from 'rehype-katex'
import rehypeRaw from 'rehype-raw'
import remarkEmoji from 'remark-gemoji'
import remarkMath from 'remark-math'
// ...
{
markdown: {
// 使用 JS 版本的 MDX 编译器
mdxRs: false,
rehypePlugins: [
rehypeKatex,
[
rehypeRaw,
{
passThrough: [
'mdxFlowExpression',
'mdxJsxFlowElement',
'mdxJsxTextElement',
'mdxTextExpression',
'mdxjsEsm',
],
},
],
],
remarkPlugins: [remarkEmoji, remarkMath],
},
}
// ...
@sumy7 Have you installed @rspress/plugin-shiki
?
@sumy7 Have you installed
@rspress/plugin-shiki
?
HI, @iicdii
I fork the Reproduce link, then add peerDependencies
{
"peerDependencies": {
"parse5": "^6.0.1"
},
}
it worked as expect.
@sumy7 It works, thank you! Btw, I applied the plugin and the line left and right padding on the code block disappeared.
Version
Details
Installing this two plugins and run
dev
command causes an error.package version
rspress.config.ts
Reproduce link
https://codesandbox.io/p/devbox/rspress-shiki-plugin-not-working-34vm26?file=%2Fpackage.json%3A19%2C1
Reproduce Steps