You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In my electron app I went all-in on ESM and use webpack@5.95.0 to bundle typescript@5.6.3 code esm-style using "type": "module" and the following webpack config (only the relevant part):
Since this repository is already dead for a year I went ahead and patched the issue for me. Posting it here in case somebody else stumbles upon the same thing.
@use-gesture/core/utils exports from maths-0ab39ae9.esm.js @use-gesture/core/actions also imports from maths-0ab39ae9.esm.js resulting in the error.
So since I'm using yarn v3 I ran
yarn patch @use-gesture/react
edited the @use-gesture/react/dist/use-gesture-react.esm.js file to remove the the utils exports, since I don't need it. I also edited the declatations file to not export it to make sure the types are in sync.
Describe the bug
In my electron app I went all-in on ESM and use webpack@5.95.0 to bundle typescript@5.6.3 code esm-style using
"type": "module"
and the following webpack config (only the relevant part):and the following
tsconfig.json
compilerOptions:Note that I have to use
NodeNext
because I'm using ESM on both the main thread (node.js) and the renderer (browser).Sandbox or Video

I've made a minimal reproduction repo:
https://github.com/tom2strobl/usegesture-webpack-nodenext
Maybe https://github.com/arethetypeswrong/arethetypeswrong.github.io helps here? I think it's just a matter of changing exports.
Afaik usage of
module
for example is deprecated:use-gesture/packages/react/package.json
Line 23 in c779631
in favor of an export map (this for example is the one from fuse-js):
Information:
Checklist:
touch-action: none
to the draggable element.The text was updated successfully, but these errors were encountered: