WIP: Add bundle analyzer for webpack
What does this MR do?
Allows you to generate a dependency graph after compiling webpack assets in order to analyze what contributes to the size of the bundle
To use simply prefix the webpack command with ANALYZE=1
:
ANALYZE=1 yarn run webpack
It will automatically launch your default browser with an interactive dependency map once webpack is finished compiling. See screenshot:
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Our bundle sizes are getting too large and this helps us identify which components are most to blame and where to target our efforts.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together