-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 comment on default for serverModuleFormat #7536
Conversation
|
These comments are tricky since they are intended (originally) for v1 users preparing for v2. So CJS is still the default on v1. Now that v2 is released, ESM is the default but there are still 2 types of users reading these docs:
I think it's probably best to either remove these specific comments or change them to |
Yes, I considered that, but the document is, at some level, upgrading a user to v2, not to v1.9 with the v2 flags. Users that are upgrading to v1.9 with all flags enabled, would be best served to use the v1.9 documentation. |
If the document were only intended to be read by users upgrading straight to v2, then it wouldn't include the steps of telling them to set
In an ideal world, yes. But in practice these users are going to land on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Seconding Matt's suggestion here, using default value in 1.x/default value in 2.x
would help avoid any confusion
c8d26ef
to
f0c698b
Compare
I updated the comments to the following: serverModuleFormat: "cjs", // default value in 1.x, add before upgrading
...
serverModuleFormat: "esm", // default value in 2.x, can be removed once upgraded |
Thank you! I think that's much clearer 👍 |
Since the default for
serverModuleFormat
is nowesm
, the comments in the v2 guide for the different configurations ofserverBuildTarget
were incorrect.