Inline framework packages and check for react-dom/server usage #19
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.
The framework test was changed in gatsby 5.6 via gatsbyjs/gatsby#37508
Therefor framework.test is no longer of type RegExp and fixFrameworkCache would return early. This resulted in the non-creation of framework-[contenthash].js. Instead the framework was then located in app-[contenthash].js
Since I didn't find a good way to get the framework bundles, I just inlined them from the gatsby repos. They were not changed since 2020 (the creation of the framework chunking). So this seems pretty stable.
Further this now checks for react-dom/server and does not include it in the framework bundle as done in the main gatsby repos by PR linked above.
\ cc @LekoArts Maybe you have the time to quickly glance over this?