-
Notifications
You must be signed in to change notification settings - Fork 102
Disable webpack bundle analyzer plugin by default to speed up development cycle #1263
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
Disable webpack bundle analyzer plugin by default to speed up development cycle #1263
Conversation
I think this was just a mistake in the configuration. Please correct me if this was not the intention. Signed-off-by: Marcel Robitaille <[email protected]>
The bundle analyzer plugin is very slow. When I am running with `npm run dev`, this plugin takes a few seconds after each compile. This really slows down the code-test loop for no reason. Therefore, this PR disables this plugin by default, and adds another npm script to build with this plugin enabled. Signed-off-by: Marcel Robitaille <[email protected]>
Signed-off-by: Marcel Robitaille <[email protected]>
Signed-off-by: Marcel Robitaille <[email protected]>
|
Now that this is its own command, we should consider setting |
This seems good. Do you want to implement this as well? Then, we can wait with fixing and merging the changes later. |
Sorry, I'm not sure what "this" refers to. Do you prefer:
|
|
Ahh, sorry. I meant to implement the CLI option like |
That's exactly the use case, but the change is that if the bundle analyzer is not needed, it's not even executed as it's very slow. The command
Again, these options are only for The decision depends on what is the most useful if you are working on optimizing the bundle size. In this case, you will probably be running the bundle analyzer multiple times to compare the results. In that case, maybe opening the result in a new tab every run is the best thing to do. |
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
christianlupus
left a comment
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
The bundle analyzer plugin is very slow. When I am running with
npm run dev, this plugin takes a few seconds after each compile. This really slows down the code-test loop for no reason (I think 99% of the time, we are fixing bugs and adding new features, not optimizing the bundle). Therefore, this PR disables this plugin by default, and adds another npm script to build with this plugin enabled.I also fixed
npm run build-devusingwebpack.config.jsinstead ofwebpack.devel.js, which I think was a mistake.In summary:
npm run buildis unchangednpm run build-devnow useswebpack.devel.jsand the bundle analyzer plugin is disablednpm run build-bundle-analyzeris a new script that useswebpack.devel.jsand the bundle analyzer plugin is enablednpm run devhas the bundle analyzer plugin is disabled