Closed huypham50 closed 5 months ago
Ah, okay - I guess the bundler we've been using with this module does es module interoperability differently (we're mostly using this module with remix/esbuild). We should probably just use the TS default export.
Haha banger it works thank you. For future folks if you're using Next.js you might face an issue where ReferenceError: localStorage is not defined
as well.
The fix is to import the component dynamically without SSR
import dynamic from "next/dynamic";
export const CodeEditor = dynamic(() => import("./editor").then((module) => module.CodeEditor), {
ssr: false,
});
Getting this error when
yarn build
/yarn dev
My tsconfig
My next config
Great library!