-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Feature: Allow SSR build to output ES #2152
Comments
|
This is exactly my problem. I was so long searching for what I am doing wrong, it drove me totally crazy!!!!! But yeah, when it's hard coded...... we really should have the option to output ES. As this issue is 1 year old, and there is still nothing merged... do you know any work around?? |
Workaround with |
Is your feature request related to a problem? Please describe.
I'd like to use the SSR output as part of a larger application which has
"type": "module"
set. However, SSR is hard-coded to only output CJS.vite/packages/vite/src/node/build.ts
Line 380 in c323732
Describe the solution you'd like
I'd like to be able to customize/change this, best solution would probably be via Vite detecting the module type.
Describe alternatives you've considered
Could add another flag, but I think that's a bit much and I'd hesitate to add yet another.
Additional context
I'll probably write up a PR for this myself, but wanted to get this out there first.
The text was updated successfully, but these errors were encountered: