-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(templates): enable ESM in all templates #4293
Conversation
I wouldn't count that as a bug-fix but as a feature request due to you are always able to set this on your own after initial setup |
It should be able to work well after setup without throwing exception and need further configures. |
Could you provide a reproducible? |
Yes, it works. I had this problem with lit-element, and by activating ESM, it worked
Only lit-element, but if you want, I can test them all |
That would be nice 🙂 |
|
How did you test these templates? Any code examples? |
I used my |
How did you test these templates? How are the errors thrown? |
I installed the dependencies and ran |
That doesn't sound right. I never heard that the vite templates is failing right after scaffolding. Could you please open an issue for this problem? I think I need more context for this situation. |
Please also see e.g. this issue #4307 |
Yes I know, the ESM support of Yarn PnP is still in draft. It is always possible for them to disable ESM anyway. And it's only a minority that will have to switch to CJS. |
I've seen issues caused by |
My hesitations on this PR:
|
I couldn't use Lit Element without enabling ESM, which should have been done in the template. |
Which I never heard of. Please open an issue before submitting the fix. |
Indeed, this error ( |
Description
ESM is not enabled in most templates, which causes an error when the project is started (except for Svelte, fixed by #3835).
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).