feat: add rehypeHighlight plugin in mdx

This commit is contained in:
p-sw 2024-06-01 02:32:27 +09:00
parent 4f2884077a
commit c1bfe4bb13

View File

@ -3,10 +3,11 @@ import react from "@vitejs/plugin-react";
import tailwindcss from "tailwindcss"; import tailwindcss from "tailwindcss";
import mdx from '@mdx-js/rollup'; import mdx from '@mdx-js/rollup';
import { resolve } from 'node:path'; import { resolve } from 'node:path';
import rehypeHighlight from "rehype-highlight";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react(), mdx()], plugins: [react(), mdx({ rehypePlugins: [rehypeHighlight] })],
css: { css: {
postcss: { postcss: {
plugins: [tailwindcss()], plugins: [tailwindcss()],