Skip to Content
Dependency audit

Dependency audit

A dependency scanner reports packages and files as unused when something other than an import needs them. I run npx knip@5 in the repo root and in docs-site/, and I treat its output as a list of candidates to check. Everything below looks unused to it and is required.

The full record of the sweep from issue 266 is in docs/research/2026-10-11-dependency-audit.md: what I removed, the evidence for each removal, the font check and the before and after measurements. It also covers the Next.js 16 upgrade from issue 278, with the verification results. Its tables show Yarn commands, because the repository moved to PNPM on 2026-10-11. Use the pnpm equivalents.

Packages that look unused and are not

PackageWhy I keep it
eslint-config-nexteslint.config.mjs imports its core-web-vitals and typescript flat configs.
webpackPeer dependency (^5) of @posthog/webpack-plugin, which withPostHogConfig in next.config.ts loads.
@react-email/uireact-email (pnpm email:dev) resolves its preview server from the project and offers to install it otherwise.
sharp, playwrightUsed by scripts/assets/ and scripts/probes/, and playwright also by CI.
docs-site/content/_meta.jsNextra reads it by convention.

Assets that look unused and are not

AssetWhy I keep it
src/assets/gallery/*Imported by src/content/gallery.ts and about.ts.
public/email/logo.png, logo-dark.pngReferenced by absolute URL in src/emails/theme.ts, so no import shows it. Email clients fetch them.
public/icons/*, src/assets/icons/logos/logo.svgGenerated by pnpm icons:generate, listed in src/app/manifest.ts, checked by pnpm icons:check.
docs-site/public/logo.svgServed at /logo.svg and used by docs-site/app/layout.tsx.
src/assets/fonts/atomic-serif/AtomicSerif.ttfSource for scripts/fonts/build_variable_font.py. Only the .woff2 ships.

The React Compiler warnings I left on

The React Compiler rules that ship with eslint-config-next 16 (react-hooks/purity, react-hooks/refs, react-hooks/set-state-in-effect) reported 21 places in the motion code when I upgraded. I set them to warn in eslint.config.mjs. Fixing them changes animation behavior, and a framework upgrade is the wrong place to change that. Clear them in a separate change, then drop the override.

Last updated on