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.
This module has solved a lot of my headaches, but there are still some edge cases. To work with ESM, the code
needs to be rewritten to
which this module currently doesn't do. (Note that
@react-three/dreidoesn't use theexportsfield.) I don't want to put the.jsin my.tssource since the CJS version should (probably?) import@react-three/drei/core/useContextBridge.cjs.js.