Skip to content

ReferenceError: exports is not defined #719

@danez

Description

@danez

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';

...
Image

ref: reactjs/react-docgen#976

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions