-
Notifications
You must be signed in to change notification settings - Fork 44
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 importComponent
(v15.x)
#2078
Merged
Merged
Conversation
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
hops-release-bot
bot
added
the
📦 v15
Apply this label to a pull request, if it has to be cherry-picked to the v15.x-branch after merging.
label
Feb 16, 2022
Merged
1 task
We observed that in some cases the generated module ids differe between the browser and server build. This happens when one of the builds is able to concatenate modules into one chunk while the other build can't (e.g. because the modules live in different chunks because of code splitting). Because we did not want to split the server build into chunks and then load them manually, we decided to generate stable chunk names, that do not differ between browser/server, in our importComponent babel plugin. We tried to work around this issue previously via #1976 but with a later webpack version our workaround stopped working. Furthermore, our previous workaround had other issues, which impacted tree-shaking and therefore the bundle size. Co-authored-by: Markus Wolf <markus.wolf@new-work.se> Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se> Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
In case the `--experimental-esbuild` mode is used, we have a small webpack loader to handle the `importComponent` transformation. This had been introduced in #1632 to be a quick & dirty regex based replacer. With this commit we now have a webpack loader that has a fast-exit path in case `importComponent` is not used. Otherwise it will transpile the source code using the proper babel plugin. Co-authored-by: Markus Wolf <markus.wolf@new-work.se> Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se> Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Markus Wolf <markus.wolf@new-work.se> Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se> Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
in the current setup, webpack builds where still running when the puppeteer tests would start, which leads to timeout issues, especially on slow machines like CI servers. This commit waits for the build to finish before continuing with `getUrl`, which is called by the integration tests upfront Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
ZauberNerd
force-pushed
the
fix-importcomponent-v15.x
branch
from
February 16, 2022 13:41
12f7787
to
cbc5ba1
Compare
ZauberNerd
approved these changes
Feb 16, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
📦 v15
Apply this label to a pull request, if it has to be cherry-picked to the v15.x-branch after merging.
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.
Please resolve the conflicts and merge this PR afterwards by running the following command:
After successfully resolving all conflicts, you need to force-push your changes.
Ref: #1632, #1976
Todo:
namedChunkGroups
which point to the same asset.Bors merge bot cheat sheet
We are using bors-ng to automate merging of our pull requests. The following table provides a summary of commands that are available to reviewers (members of this repository with push access) and delegates (in case of
bors delegate+
orbors delegate=[list]
).This is a short collection of opinionated commands. For a full list of the commands read the bors reference.