refactor(rsc): load client reference without vite preload #891
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.

Entirely removing
__vite__mapDepsand__vitePreloadmeans that we give up supporting lazy preload and css for dynamic import inside client boundary. But this is probably reasonable since we expect client boundary as js/css code splitting boundary.todo
__vite__mapDepsentirely and test (by patching outvite:build-import-analysis?)parcelRequire.load(chunk)?)import "(server-dep-chunk)"hoisted to entry, so post-bundler can detect. Even thoughimport(url)used byparcelRequire.loadis not statically analyzable, wrangler can handle dynamic import as long as chunks are detected for deployment.react-server-dom-webpackpatches__webpack_require__.uto overwrite chunk loading logic from flight payload.@hiogawa/react-server__vite__mapDepsperf: reduce preload marker markup size vitejs/vite#14550 and have dependent chunks inline like before that PR? That would essentially avoid baking client chunks in main browser bundle and dependency chunks are only encoded in each chunk itself. Wouldn't that approach technically equivalent in terms of "rsc spirit"?__vitePreloadcorrectly and when necessary vitejs/vite#19722