revert: starter vite config server bundle optimizations #6265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The commented SSR configuration in vite.config.ts intended to enhance server code bundling for production builds by including all development dependencies and excluding specified production dependencies to optimize the server bundling.
This has led to consumers adding packages in the wrong location, and as a result these packages do not work in production.
This PR comments out that code, and labels it as an advanced config for when you understand which dependencies should be consumed either as a dependency, or dev dependency.
In the future, I believe we should uncomment this code by default, but only when better error handling is present, as it was difficult to debug. For example, a CLI message that tells us whether the wrong dependency was bundled or not.
For more context see:
https://discord.com/channels/990511757091033108/1040763063533588562/1237190861985550376
from the Qwikifiers discord
Original change:
#5961
cc @wmertens
Checklist: