-
Notifications
You must be signed in to change notification settings - Fork 2k
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 CSS duplication from the Help Center chunk #97480
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~847 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~107773 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~3798 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
In one of the least intuitive issues I faced probably ever, it seems importing the Help Center asynchronously in Stepper broke things in the client app. Yes, the act of importing a package, that also happens to be imported in another app, can hurt this other app.
The reason, explained by @jsnajdr, is that Webpack considers both importers and then decides how standalone the chunk can be. If a chunk depends on A, B, C, D libs, imported into an app that has A, B, C, it only needs to bundle D and its own code. But if you then import that chunk into another app, that only has A in it, the chunk will have to include B, C, and D. The issue is that the chunk is shared between both apps. Forcing the bigger app to have two copies of A, B, C. This is especially problematic with CSS. As the copies mess up the specificity because the second copy acts like a reset for all the customizations the app added over the library, and reverts the elements to their default styles in the library
Proposed Changes
Why are these changes being made?
To prevent CSS issues.
Testing Instructions