Markdown is not perfectly rendered in remix vite #2522
-
I have a problem with markdown being rendered imperfectly, for example the code doesn't automatically scroll when it is responsive, I built this website with remix, here is the website you can visit my website and this is the vite config that I did import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import mdx from "@mdx-js/rollup";
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import rehypePrettyCode from "rehype-pretty-code";
export default defineConfig({
plugins: [
mdx({
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter],
rehypePlugins: [rehypePrettyCode],
}),
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
},
}),
tsconfigPaths(),
],
}); I would be very grateful if there are friends there who have a solution to this problem. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Welcome @mhanifmuhsin! 👋 MDX does not provide styles, what you are seeing is a stylesheet issue. Rehype pretty code block recommends these styles https://rehype-pretty.pages.dev/#styles |
Beta Was this translation helpful? Give feedback.
Yes