Frontend

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, and loading rule
ImportWhere it appears in part 3Loading rule
/site.js, /theme.css, /site.cssEvery guide page in this partStyles in head, site.js deferred. Keep.
/shared-helpers.jsMy Library and Share answer, loaded eagerly before inline tool codeNeeded immediately by those tools. Keep for those pages only.
/my-answers-store.jsShare answer, loaded eagerly before inline share codeNeeded immediately by that tool. Keep for that page only.
/save-answer-bundle.jsSave answer bundle, started from IntersectionObserver plus pointer, focus and keydownAlready lazy. Copy this pattern.
/assets/weekly-quality.jsWeekly quality rate, started from IntersectionObserver and idle timeAlready 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.

Duplicate code, copies named in the pack, and the owner for the first slice
RankDuplicate codeCopies named in the packFirst owner
1Search matcher: synonym map, word split, one-letter-off rule and token matchMy 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
2Saved-answer loaders that parse campus-answers:my-answers:v1My Answers, Print answers, Answer library, Sample start, return start, My Data and My LibraryNot changed in this slice. Route through one loader after the search slice.
3List node builders, node caches and signaturesMy Answers, Saved Essentials, Print answers and OfflineNot changed in this slice. Keep node cache local to one render.
4Filter-to-address writers with per-page defaults and debounceMy Answers, Saved Essentials, Print answers, Offline, Search and Answer libraryNot 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.