Skip to content

Add extensions to third-party imports without export maps #2

@ysulyma

Description

@ysulyma

This module has solved a lot of my headaches, but there are still some edge cases. To work with ESM, the code

import {useContextBridge} from "@react-three/drei/core/useContextBridge";

needs to be rewritten to

import {useContextBridge} from "@react-three/drei/core/useContextBridge.js";

which this module currently doesn't do. (Note that @react-three/drei doesn't use the exports field.) I don't want to put the .js in my .ts source since the CJS version should (probably?) import @react-three/drei/core/useContextBridge.cjs.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions