[Flight] Expand the fixture to use require.extensions #20209
Merged
+59
−21
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.
This expands the fixture a bit with some more interesting cases like modules shared between multiple entry points and hybrid modules.
Notably, as configured, the Container.js file ends up getting sent twice always. Which is not a great heuristic.
This also use require.extensions to replace .client imports. The simplest server doesn't need AOT compilation. Instead we can just configure require.extensions. This is probably not the best idea to use in a full framework but is enough to show the set up.
We should really set up a Webpack build for the server but it's kind of PITA so didn't bother yet.