Skip to content

fix(a11y): move bundled deps to devDependencies - #231

Merged
antfu merged 1 commit into
mainfrom
plan-035-a11y-dep-classes
Aug 15, 2026
Merged

fix(a11y): move bundled deps to devDependencies#231
antfu merged 1 commit into
mainfrom
plan-035-a11y-dep-classes

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Summary

plugins/a11y/package.json declared axe-core and solid-js as runtime dependencies, but both are fully bundled at build time:

  • axe-core is inlined into the in-page agent bundle dist/inject/inject.js (~937 KB).
  • solid-js is inlined into the SPA bundle dist/spa/.

No node-side entry (index, cli, node, vite, client) imports either package, so every installer was paying ~6.7 MB for bytes that already ship inside dist/. This mirrors how hub-ui already classifies its bundled vue/fuse.js/dompurify.

Changes

  • Moved axe-core and solid-js from dependencies to devDependencies in plugins/a11y/package.json (kept catalog:frontend references).
  • Left @devframes/vite and cac in dependencies (cac is a genuine runtime need — dist imports devframe/adapters/cac).
  • Updated pnpm-lock.yaml accordingly.

Verification (Plan 035)

  • Drift check: git diff --stat 97cbe1d3..HEAD -- plugins/a11y on the base was empty — no changes since the plan was written.
  • pnpm --filter @devframes/plugin-a11y build succeeds.
  • Grepped plugins/a11y/dist for external imports of axe-core/solid-js — zero matches; everything remains inlined.
  • Sanity-ran the plugin's CLI (node bin.mjs) — starts cleanly, serves the auth-gated dev server without import errors.
  • pnpm lint — passes (pre-existing unrelated jsdoc warnings only).
  • pnpm knip — no unused/unlisted dependency flags for axe-core/solid-js (only a pre-existing unrelated @nuxt/schema hint).
  • pnpm --filter @devframes/plugin-a11y test (and vitest run plugins/a11y) — 21/21 tests pass.
  • pnpm test (full repo) — flaky failures in unrelated packages (@devframes/hub terminal-spawn timing, hub-next/tsnapi timeouts) reproduced only under this sandbox's heavy concurrent load (load average ~19-21 on 10 cores from other agents' sessions); each failing test passes cleanly in isolation. Nothing failing is in plugins/a11y.
  • pnpm typecheck — all 30 packages pass.
  • pnpm build — all 23 packages build successfully (full cache hit).

Acceptance criteria

  • dependencies of plugin-a11y no longer include axe-core or solid-js.
  • Built dist has no external imports of either.
  • Full pre-PR check suite passes (lint/knip/test/typecheck/build), modulo pre-existing environment-flaky tests unrelated to this change.

Created with the help of an agent.

axe-core and solid-js are fully inlined at build time (axe-core into
dist/inject/inject.js, solid-js into dist/spa/) - no node-side entry
imports either package. Move both from dependencies to devDependencies
so installers no longer pay for bytes already shipped in dist/,
cutting install size from ~8.7 MB to ~2.0 MB. Zero behaviour change.
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 5e0b053
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a7fe7ef60f431000837e75c
😎 Deploy Preview https://deploy-preview-231--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 6ffeeb3 into main Aug 15, 2026
12 checks passed
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.

2 participants