-
Notifications
You must be signed in to change notification settings - Fork 22
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
Avoid some counter-productive lazy loaded files #7381
Conversation
Feel free to close if there are other reasons to lazy-load this component |
DocumentViewLazy
componentDocumentViewLazy
component and elementPicker
lazyLoad
DocumentViewLazy
component and elementPicker
lazyLoadDocumentViewLazy
component and elementPicker
lazy load
// Include here to avoid error during header generation (which runs in node environment) | ||
const { userSelectElement } = await import( | ||
/* webpackChunkName: "editorContentScript" */ "@/contentScript/pageEditor/elementPicker" | ||
); |
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.
Also dropping this for the same reason. This is actually how I ended up on this comment, via awesome-webextension/webpack-target-webextension#42 (comment)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7381 +/- ##
==========================================
+ Coverage 72.52% 72.54% +0.01%
==========================================
Files 1207 1205 -2
Lines 37684 37676 -8
Branches 7067 7067
==========================================
Hits 27331 27331
+ Misses 10353 10345 -8 ☔ View full report in Codecov by Sentry. |
It's conceivably better from a sidebar startup time due to code-splitting. But you'd need to double-check the bundles before vs after |
DocumentViewLazy
component and elementPicker
lazy load
Those are the minified and sourcemap-less sizes.
This lead me to see that a lot of bundles are empty:
I dropped these two because they shared the same |
I think it's worth reverting DocumentLazy. But we should definitely keep your other changes. |
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
pixiebrix-extension/src/bricks/renderers/documentView/DocumentViewLazy.tsx
Lines 21 to 29 in 37dccd0
The comment is no longer applicable after the header script change:
This component was created in https://github.com/pixiebrix/pixiebrix-extension/pull/1999/files#diff-449c5467324895cc4e550d57294d9308482dbb34d09856db7d71ae5a73c58586
Checklist