## What's changed in this PR ### Update to latest available `semver`: `7.3.2` * `semver` 5.x pulls in the entire library in one large file (~38k uncompressed / ~9k gz), when we might only use 1-2K. * `semver` 7.0+ supports tree-shaking: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#700 ### Update paths to only import individual function(s) used instead of the entire library * Getting the smaller bundle requires a different import style [as shown in the docs](https://github.com/npm/node-semver#usage) * Only changed code in `public` & `common` folders; not `server`. We could also update `server` as well for consistency, but I skipped because the new import style is more verbose and the filesize didn't seem as important on the server ### Results The build stats show a 10K+ improvement for initial page bundles https://github.com/elastic/kibana/pull/83020#issuecomment-724724432 | id | [before]( |
||
---|---|---|
.. | ||
build_version.ts | ||
flags.ts | ||
git_info.ts | ||
pkg.ts |