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
woudl you consider adding "type"="module" to the package.json, seeing as ESM is pretty much the way forward for the JS ecosystem? I finally moved the dependency back to this package from our fork and ran into some issues with Vite and SSR today.
Node.js will treat the following as ES modules when passed to node as the initial input, or when referenced by import statements or import() expressions:
Files with an .mjs extension.
Files with a .js extension when the nearest parent package.json file contains a top-level "type" field with a value of "module".
The esm export of wheel-gestures uses .esm.js as its extension, which does not get picked up by node and results in vite thinking its a common js module when trying to build the server bundle.
You could either change the filename of the esm build to wheel-gestures.mjs or add "type"="module" to the package.json.
Thanks again for making the suggested changes with the exports field!
The text was updated successfully, but these errors were encountered:
Hi xiel,
woudl you consider adding
"type"="module"
to the package.json, seeing as ESM is pretty much the way forward for the JS ecosystem? I finally moved the dependency back to this package from our fork and ran into some issues with Vite and SSR today.From the Node docs:
The
esm
export of wheel-gestures uses.esm.js
as its extension, which does not get picked up by node and results in vite thinking its a common js module when trying to build the server bundle.You could either change the filename of the esm build to
wheel-gestures.mjs
or add"type"="module"
to the package.json.Thanks again for making the suggested changes with the exports field!
The text was updated successfully, but these errors were encountered: