Skip to content

Remove unused vendor JS builds - #316

Open
LunaUrsa wants to merge 1 commit into
uatfrom
chore/remove-unused-vendor-js
Open

LunaUrsa wants to merge 1 commit into
uatfrom
chore/remove-unused-vendor-js

Conversation

@LunaUrsa

Copy link
Copy Markdown
Contributor

Summary

Deletes the unminified and alternate builds of aos, bootstrap, glightbox and isotope from public/assets/vendor/. The site only loads aos.js, bootstrap.bundle.min.js, glightbox.min.js and isotope.pkgd.min.js (src/pages/_document.tsx); nothing references the other copies.

Those unused copies were the source of every current DeepScan finding (NULL_POINTER, INSUFFICIENT_NULL_CHECK, CONSTANT_CONDITION, UNUSED_VAR_ASSIGN, TOO_MANY_ARGS). The findings are in third-party library code and several are intentional (for example var h = this.element.offsetHeight forces a reflow), so removing the dead files is the fix rather than patching the libraries.

Removed (14 files, ~23.7k lines):

  • aos/aos.cjs.js, aos/aos.esm.js
  • bootstrap/js/bootstrap.js, bootstrap.bundle.js, bootstrap.esm.js, bootstrap.min.js, bootstrap.esm.min.js, and their .map files
  • glightbox/js/glightbox.js
  • isotope-layout/isotope.pkgd.js

Kept: bootstrap.bundle.min.js and its map, which appeal.tsx still needs for the collapse.

Related to #269, which covers the wider template-script cleanup (relative paths, triple AOS load, unused glightbox/isotope/validate.js). This PR does not close it.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor / chore
  • Other (describe above)

Checklist

Test plan

  • Confirmed every vendor script and stylesheet referenced by _document.tsx and _app.tsx still exists.
  • Searched the repo for references to the removed files; the only hits were the removed files' own source-map comments.
  • npx eslint . and npx next build pass on this branch.

🤖 Generated with Claude Code

Delete the unminified and alternate builds of aos, bootstrap, glightbox and
isotope from public/assets/vendor. The site only loads aos.js,
bootstrap.bundle.min.js, glightbox.min.js and isotope.pkgd.min.js; the other
copies were never referenced and were the source of every DeepScan finding
(null checks, constant conditions, unused assignments) in third-party code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant