ESM support? #33
TessavWalstijn
started this conversation in
General
Replies: 1 comment
-
“support ESM” is the wrong phrasing; vite’s messaging here is just incorrect. CJS modules can be imported into ESM just fine. Please don’t attempt to change the format of any package you’re not a maintainer on; that’s just not an appropriate task for a non-maintainer unless a maintainer has explicitly indicated it would be welcome. The proper solution here is to configure vite to accept CJS properly, just like node and every other bundler does. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi recently I have come across some warnings in a Vite ESM project to resolve node modules to the browser.
However due to the following packages only being available in CJS it errors and breaks the build.
There is one build in TS what could be configured to create an ESM build:
This package comes from substack but they result in a 404
My questions are:
This will make the difference if I will start creating PR's on existing packages to update them to support ESM
Or create my own versions (potentially in an open github org browserify-ts or browserify-esm)
A similar discussion looks like this one discussions/22 but I perceive it as inactive.
Beta Was this translation helpful? Give feedback.
All reactions