-
Notifications
You must be signed in to change notification settings - Fork 26
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
base: main
Are you sure you want to change the base?
build: Vendor Split Popular Packages #3499
Conversation
Bundle ReportChanges will increase total bundle size by 30.97kB (0.18%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 30.97kB (0.18%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ 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
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ 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
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ 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
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ 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
Continue to review full report in Codecov by Sentry.
|
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', | ||
], |
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.
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?
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.
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
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.
thanks for checking
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.
Nice!
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
rollupOptions.output.manualChunks
to split out packages into their own chunks