Skip to content

Commit

Permalink
Remove lowlight
Browse files Browse the repository at this point in the history
  • Loading branch information
tautastic committed Oct 9, 2024
1 parent fff9cb0 commit 852006a
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 122 deletions.
8 changes: 7 additions & 1 deletion apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
*/
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env.mjs"));

import bundleAnalyzer from "@next/bundle-analyzer"

const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
})

/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
Expand Down Expand Up @@ -67,4 +73,4 @@ const config = {
assetPrefix: `${process.env.NEXT_PUBLIC_BASE_URL}/`
};

export default config;
export default withBundleAnalyzer(config);
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"clsx": "^2.1.1",
"copy-to-clipboard": "^3.3.3",
"fuse.js": "^7.0.0",
"lowlight": "^3.1.0",
"ltx-editor": "workspace:^",
"lucide-react": "^0.447.0",
"nanoid": "^5.0.7",
Expand Down
6 changes: 0 additions & 6 deletions apps/web/src/components/editor/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { common, createLowlight } from "lowlight";
import {
CodeBlockLowlight,
HorizontalRule,
MathBlock,
MathInline,
Expand Down Expand Up @@ -89,9 +87,5 @@ export const defaultExtensions = [
class: cn("mt-4 mb-6 border-t border-gray-200 dark:border-gray-800"),
},
}),
CodeBlockLowlight.configure({
lowlight: createLowlight(common),
defaultLanguage: "javascript",
}),
Youtube,
];
1 change: 0 additions & 1 deletion packages/headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@radix-ui/react-slot": "^1.1.0",
"@tiptap/core": "^2.8.0",
"@tiptap/extension-character-count": "^2.8.0",
"@tiptap/extension-code-block-lowlight": "^2.8.0",
"@tiptap/extension-color": "^2.8.0",
"@tiptap/extension-highlight": "^2.8.0",
"@tiptap/extension-horizontal-rule": "^2.8.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/headless/src/extensions/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { InputRule } from "@tiptap/core";
import CharacterCount from "@tiptap/extension-character-count";
import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";
import { Color } from "@tiptap/extension-color";
import Highlight from "@tiptap/extension-highlight";
import TiptapImage from "@tiptap/extension-image";
Expand Down Expand Up @@ -36,7 +35,6 @@ const SimpleExtensions = [

export * from "./slash-command";
export {
CodeBlockLowlight,
HorizontalRule,
ImageResizer,
InputRule,
Expand Down
Loading

0 comments on commit 852006a

Please sign in to comment.