-
Notifications
You must be signed in to change notification settings - Fork 321
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
Gather breakdown of modules content #3281
Closed
5 tasks done
Labels
Comments
romaricpascal
added
awaiting triage
Needs triaging by team
performance
javascript
tooling
labels
Feb 13, 2023
3 tasks
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What
Collect which modules get added to built bundles when importing our modules1. This can be:
import Accordion from 'govuk-frontend/components/accordion.mjs'
)all.mjs
(import {Accordion} from 'govuk-frontend'
)import * as GOVUKFrontend from 'govuk-frontend'
)Display this breakdown inside the review app so it can be accessible for each pull-request.
Why
This will let us check which sub-modules are part of each of our main modules, and spot when our changes make a component inadvertently bring in a sub-module they don't need.
This also lets us check that our modules tree-shake as expecting, bringing only the code they need in the final bundle.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
Footnotes
Using a similar approach to the performance spike, with
rollup-plugin-visualizer
↩rollup-plugin-visualizer provides 3 kinds of visualisation, but we only really need the treemap or sunburst. Neither are particularly accessible, though (information is only available on hover), hence the text alternative we need to have. ↩
The text was updated successfully, but these errors were encountered: