Skip to content
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: Vendor Split Popular Packages #3499

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nicholas-codecov
Copy link
Contributor

@nicholas-codecov nicholas-codecov commented Nov 14, 2024

Description

This PR utilizes a practice called "vendor splitting", where packages that are used site wide are split out into their own chunk files. This brings some optimizations because these files change rarely and are able to be cached after first load reducing the amount of JS being loaded on initial load when the user visits the site.

Notable Changes

  • Use rollupOptions.output.manualChunks to split out packages into their own chunks

@codecov-staging
Copy link

codecov-staging bot commented Nov 14, 2024

Bundle Report

Changes will increase total bundle size by 30.97kB (0.18%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.63MB 14.81kB (0.26%) ⬆️
gazebo-staging-system 5.58MB 16.16kB (0.29%) ⬆️

Copy link

codecov bot commented Nov 14, 2024

Bundle Report

Changes will increase total bundle size by 30.97kB (0.18%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.58MB 16.16kB (0.29%) ⬆️
gazebo-production-system-esm 5.63MB 14.81kB (0.26%) ⬆️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Nov 14, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
d1ea6c2 Thu, 14 Nov 2024 14:24:38 GMT Expired Expired
d1ea6c2 Thu, 14 Nov 2024 14:29:34 GMT Expired Expired
fbbb7c2 Wed, 20 Nov 2024 17:16:03 GMT Cloud Enterprise

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.09%. Comparing base (fe14916) to head (d1ea6c2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3499   +/-   ##
=======================================
  Coverage   99.09%   99.09%           
=======================================
  Files         806      806           
  Lines       14354    14354           
  Branches     4075     4075           
=======================================
  Hits        14224    14224           
  Misses        123      123           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.73% <ø> (ø)
UI 99.21% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe14916...d1ea6c2. Read the comment docs.

@codecov-notifications
Copy link

codecov-notifications bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3499   +/-   ##
=======================================
  Coverage   99.09%   99.09%           
=======================================
  Files         806      806           
  Lines       14354    14354           
  Branches     4082     4082           
=======================================
  Hits        14224    14224           
  Misses        123      123           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.73% <ø> (ø)
UI 99.21% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe14916...d1ea6c2. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.09%. Comparing base (fe14916) to head (d1ea6c2).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3499   +/-   ##
=======================================
  Coverage   99.09%   99.09%           
=======================================
  Files         806      806           
  Lines       14354    14354           
  Branches     4082     4075    -7     
=======================================
  Hits        14224    14224           
  Misses        123      123           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.73% <ø> (ø)
UI 99.21% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe14916...d1ea6c2. Read the comment docs.

Copy link

codecov-public-qa bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.09%. Comparing base (fe14916) to head (d1ea6c2).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3499   +/-   ##
=======================================
  Coverage   99.09%   99.09%           
=======================================
  Files         806      806           
  Lines       14354    14354           
  Branches     4075     4075           
=======================================
  Hits        14224    14224           
  Misses        123      123           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.81% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.73% <ø> (ø)
UI 99.21% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe14916...d1ea6c2. Read the comment docs.

@nicholas-codecov nicholas-codecov marked this pull request as ready for review November 20, 2024 17:09
Comment on lines +79 to +94
vendor_lodash: [
'lodash/get',
'lodash/isEqual',
'lodash/isNull',
'lodash/isNil',
'lodash/isEmpty',
'lodash/isString',
'lodash/isNumber',
'lodash/isBoolean',
'lodash/isUndefined',
'lodash/isArray',
'lodash/gt',
'lodash/omit',
'lodash/flatMap',
'lodash/groupBy',
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would we be able to leverage the use of ['lodash'] from https://rollupjs.org/configuration-options/#output-manualchunks so that we don't need to list each individual function one by one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted that, however it did not work and included everything. I think mainly because we're not using @rollup/plugin-node-resolve we're using whatever is built into Vite

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for checking

Copy link
Contributor

@calvin-codecov calvin-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants