Site bundle audit: every import and duplicate in part 3
This page inventories every imported library and duplicate dependency visible in pack app-campus.site.3 and states the first ready-to-ship slice: one shared search core, loaded only when a person first searches.
Imported libraries and page scripts in this part
There is no package.json, lockfile or bundler in this part. The shipped bundle is the deferred global script, the shared stylesheets, and each page inline tool script.
| Import | Where it appears in part 3 | Loading rule |
|---|---|---|
| /site.js, /theme.css, /site.css | Every guide page in this part | Styles in head, site.js deferred. Keep. |
| /shared-helpers.js | My Library and Share answer, loaded eagerly before inline tool code | Needed immediately by those tools. Keep for those pages only. |
| /my-answers-store.js | Share answer, loaded eagerly before inline share code | Needed immediately by that tool. Keep for that page only. |
| /save-answer-bundle.js | Save answer bundle, started from IntersectionObserver plus pointer, focus and keydown | Already lazy. Copy this pattern. |
| /assets/weekly-quality.js | Weekly quality rate, started from IntersectionObserver and idle time | Already lazy. Copy this pattern. |
Duplicate dependencies, heaviest first
The first row is the slice shipped by this page. The later rows are stated so a builder does not start with a larger, riskier rewrite.
| Rank | Duplicate code | Copies named in the pack | First owner |
|---|---|---|---|
| 1 | Search matcher: synonym map, word split, one-letter-off rule and token match | My Library inline script, plus the copies named on State ownership in site.js, My Answers, Offline, Search and components/search.js | /assets/search-core.js, loaded with import() on first search input or focus |
| 2 | Saved-answer loaders that parse campus-answers:my-answers:v1 | My Answers, Print answers, Answer library, Sample start, return start, My Data and My Library | Not changed in this slice. Route through one loader after the search slice. |
| 3 | List node builders, node caches and signatures | My Answers, Saved Essentials, Print answers and Offline | Not changed in this slice. Keep node cache local to one render. |
| 4 | Filter-to-address writers with per-page defaults and debounce | My Answers, Saved Essentials, Print answers, Offline, Search and Answer library | Not changed in this slice. One filterState per page. |
Estimated saving for the first slice: about 2.7 KB removed from My Library initial HTML and JS by replacing its inline matcher with the shared import, and about 11 KB before gzip if the five copies named above are routed through the same owner. This is an estimate from the visible inline block, not a build measurement. No visible behavior changes: the same fields are searched, every typed word still must match, and counts and empty states keep the same labels.
Try the lazy shared matcher
Example only. Nothing here is sent to a server. The module is fetched only after the button is used, not on page load.
The shared matcher has not been loaded yet on this page.
Check used after load: enroll matches admissions through the synonym rule.