Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(PrismCode): react renderer * 2
  • Loading branch information
tenphi committed Jun 3, 2025
commit 37b8f4af6f02e1adcedf9cbeb4cbfa8b67deb88f
16 changes: 6 additions & 10 deletions src/components/content/PrismCode/PrismCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ import {
// any additional grammars so that those grammars augment this exact object.
(globalThis as any).Prism = RendererPrism;

// Vite will pre-bundle these. The `@vite-ignore` keeps it from trying to
// statically analyze the variable `path`.
await Promise.all([
import('prismjs/components/prism-diff'),
import('prismjs/components/prism-sql'),
import('prismjs/plugins/diff-highlight/prism-diff-highlight'),
// already bundled in most cases, but kept for completeness
import('prismjs/components/prism-javascript'),
import('prismjs/components/prism-yaml'),
]);
import('prismjs/components/prism-diff');
import('prismjs/components/prism-sql');
import('prismjs/plugins/diff-highlight/prism-diff-highlight');
// already bundled in most cases, but kept for completeness
import('prismjs/components/prism-javascript');
import('prismjs/components/prism-yaml');

const PreElement = tasty({
as: 'pre',
Expand Down
Loading