Since #702 react-codemirror throws an error for me. I haven't had time to dig deeper, but it seems that the commons file is loaded, but because of "type:module" it is interpreted as ESM.
This is how I import in my source:
import { useCallback } from 'react';
import { useTheme } from 'next-themes';
import CodeMirror from '@uiw/react-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { json } from '@codemirror/lang-json';
import { EditorView } from '@codemirror/view';
...
ref: reactjs/react-docgen#976
Since #702 react-codemirror throws an error for me. I haven't had time to dig deeper, but it seems that the commons file is loaded, but because of "type:module" it is interpreted as ESM.
This is how I import in my source:
ref: reactjs/react-docgen#976