Merged
Conversation
Because: - We can get better cache performance if things that don't change often are chunked into their own packages - We can getter optimized network behavior with HTTP/2 and modern browsers by splitting up js files this way, ie multiple files can be downloaded concurrently. This Commit: - Creates a chunk for react and reach router called the 'presentation' chunk - Creates a chunk for large utils like moment or ua-parser called utils - Creates a chunk for observability libs like glean or sentry - Creates a chunk for network libs like apollo and gql
94bcca2 to
fd224e4
Compare
dschom
commented
May 29, 2025
| // This is only used in production mode | ||
| new CssMinimizerPlugin(), | ||
| ], | ||
| splitChunks: isEnvProduction ? { |
Contributor
Author
There was a problem hiding this comment.
Note, if I left out the isEnvProduction ? part, this would cause the dev environment to hang. However, I can validate the bundle is created successfully when running BUILD_TARGETS=prod yarn workspace fxa-settings build-react-prod
Contributor
|
I like it. Once we are completely off of Backbone, we should update the cache headers to cache these files for longer. |
chenba
approved these changes
May 29, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Because
This pull request
Issue that this pull request solves
Closes: FXA-11795
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.