Open stuartcrobinson opened 1 year ago
Not sure if there is a similar solution
@stuartcrobinson
This is a bit belated, but a guy on my team was able to work around that error by using Lazy and Suspense:
import React, { Suspense } from "react";
const LazyCodeEditor = React.lazy(() => import("@uiw/react-textarea-code-editor"));
export const CodeEditor: React.FunctionComponent<Parameters<typeof LazyCodeEditor>[0]> = (
props
) => (
<Suspense>
<LazyCodeEditor {...props} />
</Suspense>
);
And then import CodeEditor
from this file when you want to use it
i'm getting this error below when loading the root of my web app. code editor is on a separate route.
and i'm getting this same error after following the advice here: https://remix.run/docs/en/v1/pages/gotchas#importing-esm-packages
that is, adding this package to my
remix.config.js
isn't helping. any suggestions would be greatly appreciated! ty for an awesome component