Previously, we were not aggressive in combining common code which resulted in duplicates included in the bundles. As an example `node_modules/elasticsearch-browser/elasticsearch.angular.js` is present in the following chunks: * kibana.bundle.js * dashboardViewer.bundle.js * apm.bundle.js * monitoring.bundle.js * ml.bundle.js * timelion.bundle.js * graph.bundle.js Vendor code (anything inside Kibana's node_modules) is placed in vendors.bundle.js while everything else with more than two references is placed in commons.bundle.js. This has a couple positive side-effects (numbers are with x-pack & canvas): * Decreased build time. Seeing builds go from 475.76 seconds to 274.72. * Decreased memory overhead. Uses roughly 1/3 the memory overhead. * Decreased bundle size. A 68% reduction in overall bundle size. Going from 66.16 MB to 21.13 MB. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> |
||
---|---|---|
.. | ||
build | ||
config | ||
lib | ||
utils | ||
check_plugins.js | ||
functional_test_runner.js | ||
jenkins.js | ||
licenses.js | ||
licenses_csv_report.js | ||
plugin.js | ||
reject_rej_files.js | ||
release.js | ||
release_packages.js | ||
setup_kibana.js | ||
sterilize.js | ||
test.js | ||
test_jest.js | ||
ui_framework.js |