Skip to content

Esm module lacks extensions in imports #182

@ybouane

Description

@ybouane

I use react-router v7 which uses Vite.
When I import the module via

import CodeEditor from '@uiw/react-textarea-code-editor';

It fails with error:
Cannot find module '.../node_modules/@uiw/react-textarea-code-editor/esm/Editor' imported from .../node_modules/@uiw/react-textarea-code-editor/esm/index.js

The reason is that it is required to have an extension in the import but the ESM build is missing them.

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