-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Build: Add support for Webpack bundle analyzer #10185
Conversation
Open question is if we want to standardize the name of flags offered inside Webpack config. We have the following:
Should we prefix all of them with Where should we put the documentation? We still need to provide missing docs for the source map and live-reload feature. |
Ooh, I like solving toggling it on and off using environment variables. I am going to copy this for our plugins if you don't mind. I like it! |
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.
Prefixing them with something (in this case GUTENBERG_
) is a good idea, because that allows them to be set globally in your environment and not conflict with other environment variables. So if I wanted to always run the live reload on a different port I could set that environment variable in my shell startup file.
The only disadvantage is typing a bit more when running it inline PREFIX_BUNDLE_ANALYZER=1 npm run dev
.
Sure things, not that I come up with it myself. Calypso has this plugin enabled for long. I just wanted to enable another tool which would help to check if we don't introduce huge deps when bringing in external libraries :) |
I think prefixing with Wondering also if we should rename
Not too sure about this. |
224223b
to
fc8b079
Compare
fc8b079
to
61bceee
Compare
I added prefix We have #8982 files to document how Webpack works, so I will leave a more detailed task to be included there. See #8982 (comment). |
91da5ce
to
342b1fa
Compare
Description
This PR enabled support for Webpack bundle analyzer hidden behind the environment flag
BUNDLE_ANALYZER
.We still need to document this and other env flags we use in the Webpack config.
How has this been tested?
BUNDLE_ANALYZER=1 npm run dev
Screenshots
Checklist: