-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Update webpack bundle configuration #5983
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5983 +/- ##
=======================================
Coverage 63.56% 63.56%
=======================================
Files 393 393
Lines 23667 23667
Branches 2638 2638
=======================================
Hits 15044 15044
Misses 8610 8610
Partials 13 13 Continue to review full report at Codecov.
|
This is great. |
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.
amazing! LGTM
* add configuration for optimizing webpack * resolve webpack cli issue * Update outdated packages * extract brace as its own chunk * update comments * add list of libs to skip parsing * remove some libs from list * remove noParse
Update dependency versions (
css-loader
,webpack-cli
)Remove
json-loader
which is not necessary for webpack 4Switch from default
UglifyjsPlugin
toTerserPlugin
as minimizer. TheTerserPlugin
use an updated fork ofuglifyjs-es
under the hood whileUglifyjsPlugin
useuglifyjs
version 3 which does not support es module. This let us enableparallel
andcache
options for some speed up in the build.After analyzing the bundles, define a special chunk called
vendors-major
forbrace
,core-js
andreact-dom
which takes large portion of the three main entry points (dashboard, explore and sqllab). This will enable better caching and reduce size of the entry points. Somehow these modules were not automatically split into the common chunks as expected from default behavior.Total bundle size (in
assets/dist
directory) goes down from 14.9MB to 12.9MBBefore
After
@williaster @xtinec @conglei