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

Merged

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 31.15kB (0.18%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.65MB 14.48kB (0.26%) ⬆️
gazebo-staging-system 5.59MB 16.66kB (0.3%) ⬆️

Copy link

codecov bot commented Nov 14, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 5.59MB 16.66kB (0.3%) ⬆️
gazebo-production-system-esm 5.65MB 14.48kB (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 Expired Expired
4c6a633 Tue, 26 Nov 2024 17:44:27 GMT Expired Expired
8fd4479 Wed, 27 Nov 2024 14:50:43 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 98.92%. Comparing base (0224c6d) to head (8fd4479).
Report is 5 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   98.92%   98.92%           
=======================================
  Files         808      808           
  Lines       14411    14411           
  Branches     4101     4101           
=======================================
  Hits        14256    14256           
  Misses        148      148           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.60% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 99.33% <ø> (ø)
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 0224c6d...8fd4479. 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   98.92%   98.92%           
=======================================
  Files         808      808           
  Lines       14411    14411           
  Branches     4094     4101    +7     
=======================================
  Hits        14256    14256           
  Misses        148      148           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.60% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 99.33% <ø> (ø)
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 0224c6d...8fd4479. 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 98.92%. Comparing base (0224c6d) to head (8fd4479).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3499   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files         808      808           
  Lines       14411    14411           
  Branches     4094     4101    +7     
=======================================
  Hits        14256    14256           
  Misses        148      148           
  Partials        7        7           
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.60% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 99.33% <ø> (ø)
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 0224c6d...8fd4479. 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 Author

Choose a reason for hiding this comment

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

Wanted to double double check, tried using that plugin and it did not work, so we're stuck with this 😢

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!

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Nov 28, 2024
Merged via the queue into main with commit 0785ad8 Nov 28, 2024
61 of 62 checks passed
@nicholas-codecov nicholas-codecov deleted the build-vendor-split-packages-that-are-used-site-wide branch November 28, 2024 11:13
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