Skip to content

Commit

Permalink
fix(playground): error during Prism import (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Jul 24, 2024
1 parent 78fdd41 commit 26f5e80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@assistant-ui/react-playground",
"version": "0.0.3",
"version": "0.0.4",
"license": "MIT",
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import Editor from "react-simple-code-editor";
import { highlight, languages } from "prismjs";
import Prism from "prismjs";
import { FC } from "react";
import { cn } from "../../../lib/utils";

// TODO identify cause: using ESM imports of prism does not work for some users
const { highlight, languages } = Prism;

// https://github.com/react-simple-code-editor/react-simple-code-editor/issues/106
const EditorComponent =
(Editor as unknown as { default: typeof Editor }).default ?? Editor;
Expand Down

0 comments on commit 26f5e80

Please sign in to comment.