-
-
Notifications
You must be signed in to change notification settings - Fork 10.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 custom SSR build input with serverBundles
#13107
Open
markdalgleish
wants to merge
10
commits into
dev
Choose a base branch
from
markdalgleish/server-bundles-custom-ssr-build-input
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+268
−215
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bfdb71e
Fix custom SSR build input with `serverBundles`
markdalgleish ea4e019
Add breaking change to changeset
markdalgleish 95781a3
Avoid generating server bundle IDs twice
markdalgleish 84008da
Ensure build manifest is always loaded in dev
markdalgleish 1669bb6
Resolve build manifest during user config extraction
markdalgleish 902fece
Only resolve plugin context once per build
markdalgleish 0bf04dd
Ignore injected plugin context when using Environment API
markdalgleish 5be35b5
Clean up redundant template literal
markdalgleish 919c468
Only re-use injected build manifest
markdalgleish 7fea63d
Refactor getServerBundleRouteIds
markdalgleish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@react-router/dev": patch | ||
--- | ||
|
||
Fix support for custom SSR build input when `serverBundles` option has been configured | ||
|
||
Note that for consumers using the `future.unstable_viteEnvironmentApi` and `serverBundles` options together, hyphens are no longer supported in server bundle IDs since they also need to be valid Vite environment names. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
As noted in the changeset, we needed to replace hyphens with underscores in our server bundle IDs since we're also testing against the Vite Environment API. This is technically a breaking change but unlikely to break anyone in practice, and only those who have opted into an unstable API.
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.
Is this something the Vercel preset will need to do as well? i.e. currently it generates a bundle ID such as
nodejs-eyJydW50aW1lIjoibm9kZWpzIn0
. Does that need to benodejs_eyJydW50aW1lIjoibm9kZWpzIn0
instead?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.
Ah nice catch, I didn't realise this. Yep, swapping for an underscore now is a good idea.