-
Notifications
You must be signed in to change notification settings - Fork 248
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
(feat) Preload most extensions and pages #1461
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
ibacher
force-pushed
the
feat/fewer-webpack-chunks
branch
from
November 10, 2023 17:22
1de4672
to
7ab323e
Compare
Size Change: +238 kB (+2%) Total Size: 10.7 MB
ℹ️ View Unchanged
|
denniskigen
approved these changes
Nov 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks, @ibacher!
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.
Requirements
Summary
This is similar to other PRs in other monorepos. The goal here is to ensure that most extensions and pages are part of the main chunk for the app. While I've tried to be consistent about this, it's a little more visible in this PR that certain extensions are still imported asynchronously. I've tried to keep it so that "secondary" extensions, like confirmation dialogs or the like, are loaded asynchronously (so when they are first needed), on the assumption that there's some value in having less-used components loading deferred.
I'm not sure this makes great strides in reducing the overall JS file loading. It looks like it eliminates about 2 file loads just getting to the patient chart, though it should remove quite a few more if you actually navigate through the patient chart.Forgot to also update the Webpack config, which knocks another 6 files, so this reduces the initial load by about 8 files and should reduce loads during navigation quite a bit more.
There's also a very small bugfix which will reset the dashboard title for dashboards that do not declare a title (which is most of the dashboards in the patient chart; only appointments seems to use this feature).
Screenshots
Related Issue
Other