refactor: remove rehype-highlight plugin

This commit is contained in:
p-sw 2024-06-04 22:35:27 +09:00
parent e78e451f59
commit 3750de01e2
3 changed files with 2 additions and 60 deletions

View File

@ -17,7 +17,6 @@
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.1",
"react-syntax-highlighter": "^15.5.0",
"rehype-highlight": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"tailwind-merge": "^2.3.0"

View File

@ -3,7 +3,6 @@ import react from "@vitejs/plugin-react";
import tailwindcss from "tailwindcss";
import mdx from '@mdx-js/rollup';
import { resolve } from 'node:path';
import rehypeHighlight from "rehype-highlight";
import remarkGfm from "remark-gfm";
import withSlug from "rehype-slug"
import withToc from "@stefanprobst/rehype-extract-toc";
@ -12,7 +11,7 @@ import dynamicImport from 'vite-plugin-dynamic-import'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), mdx({ rehypePlugins: [rehypeHighlight, withSlug, withToc, withTocExport], remarkPlugins: [remarkGfm] }), dynamicImport()],
plugins: [react(), mdx({ rehypePlugins: [withSlug, withToc, withTocExport], remarkPlugins: [remarkGfm] }), dynamicImport()],
css: {
postcss: {
plugins: [tailwindcss()],

View File

@ -2570,15 +2570,6 @@ __metadata:
languageName: node
linkType: hard
"hast-util-is-element@npm:^3.0.0":
version: 3.0.0
resolution: "hast-util-is-element@npm:3.0.0"
dependencies:
"@types/hast": "npm:^3.0.0"
checksum: 10c0/f5361e4c9859c587ca8eb0d8343492f3077ccaa0f58a44cd09f35d5038f94d65152288dcd0c19336ef2c9491ec4d4e45fde2176b05293437021570aa0bc3613b
languageName: node
linkType: hard
"hast-util-parse-selector@npm:^2.0.0":
version: 2.2.5
resolution: "hast-util-parse-selector@npm:2.2.5"
@ -2651,18 +2642,6 @@ __metadata:
languageName: node
linkType: hard
"hast-util-to-text@npm:^4.0.0":
version: 4.0.2
resolution: "hast-util-to-text@npm:4.0.2"
dependencies:
"@types/hast": "npm:^3.0.0"
"@types/unist": "npm:^3.0.0"
hast-util-is-element: "npm:^3.0.0"
unist-util-find-after: "npm:^5.0.0"
checksum: 10c0/93ecc10e68fe5391c6e634140eb330942e71dea2724c8e0c647c73ed74a8ec930a4b77043b5081284808c96f73f2bee64ee416038ece75a63a467e8d14f09946
languageName: node
linkType: hard
"hast-util-whitespace@npm:^3.0.0":
version: 3.0.0
resolution: "hast-util-whitespace@npm:3.0.0"
@ -2692,7 +2671,7 @@ __metadata:
languageName: node
linkType: hard
"highlight.js@npm:^11.9.0, highlight.js@npm:~11.9.0":
"highlight.js@npm:^11.9.0":
version: 11.9.0
resolution: "highlight.js@npm:11.9.0"
checksum: 10c0/27cfa8717dc9d200aecbdb383eb122d5f45ce715d2f468583785d36fbfe5076ce033abb02486dc13b407171721cda6f474ed3f3a5a8e8c3d91367fa5f51ee374
@ -3159,17 +3138,6 @@ __metadata:
languageName: node
linkType: hard
"lowlight@npm:^3.0.0":
version: 3.1.0
resolution: "lowlight@npm:3.1.0"
dependencies:
"@types/hast": "npm:^3.0.0"
devlop: "npm:^1.0.0"
highlight.js: "npm:~11.9.0"
checksum: 10c0/ee230ba1da3b339bae640479a09a4c82e5727bae38345421767c6407db4d514c10387300900ba79aa8c64dd79ae7f8d1acff847c01d5b0a20364a5ce04685f27
languageName: node
linkType: hard
"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0":
version: 10.2.2
resolution: "lru-cache@npm:10.2.2"
@ -4558,7 +4526,6 @@ __metadata:
react-dom: "npm:^18.2.0"
react-router-dom: "npm:^6.23.1"
react-syntax-highlighter: "npm:^15.5.0"
rehype-highlight: "npm:^7.0.0"
rehype-slug: "npm:^6.0.0"
remark-gfm: "npm:^4.0.0"
tailwind-merge: "npm:^2.3.0"
@ -4605,19 +4572,6 @@ __metadata:
languageName: node
linkType: hard
"rehype-highlight@npm:^7.0.0":
version: 7.0.0
resolution: "rehype-highlight@npm:7.0.0"
dependencies:
"@types/hast": "npm:^3.0.0"
hast-util-to-text: "npm:^4.0.0"
lowlight: "npm:^3.0.0"
unist-util-visit: "npm:^5.0.0"
vfile: "npm:^6.0.0"
checksum: 10c0/bf9eba61ac2635db6c6635d3485456f2d6bdf43e3acba34deb673ddde82dc8e0a7a4ba81c4f26dda85ecc5e99a9e949c05ed1b4fb25c0414e970d9623894c935
languageName: node
linkType: hard
"rehype-slug@npm:^6.0.0":
version: 6.0.0
resolution: "rehype-slug@npm:6.0.0"
@ -5316,16 +5270,6 @@ __metadata:
languageName: node
linkType: hard
"unist-util-find-after@npm:^5.0.0":
version: 5.0.0
resolution: "unist-util-find-after@npm:5.0.0"
dependencies:
"@types/unist": "npm:^3.0.0"
unist-util-is: "npm:^6.0.0"
checksum: 10c0/a7cea473c4384df8de867c456b797ff1221b20f822e1af673ff5812ed505358b36f47f3b084ac14c3622cb879ed833b71b288e8aa71025352a2aab4c2925a6eb
languageName: node
linkType: hard
"unist-util-is@npm:^5.0.0":
version: 5.2.1
resolution: "unist-util-is@npm:5.2.1"