fix(a11y): move bundled deps to devDependencies - #231
Merged
Conversation
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.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugins/a11y/package.jsondeclaredaxe-coreandsolid-jsas runtimedependencies, but both are fully bundled at build time:axe-coreis inlined into the in-page agent bundledist/inject/inject.js(~937 KB).solid-jsis inlined into the SPA bundledist/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 insidedist/. This mirrors howhub-uialready classifies its bundledvue/fuse.js/dompurify.Changes
axe-coreandsolid-jsfromdependenciestodevDependenciesinplugins/a11y/package.json(keptcatalog:frontendreferences).@devframes/viteandcacindependencies(cac is a genuine runtime need —distimportsdevframe/adapters/cac).pnpm-lock.yamlaccordingly.Verification (Plan 035)
git diff --stat 97cbe1d3..HEAD -- plugins/a11yon the base was empty — no changes since the plan was written.pnpm --filter @devframes/plugin-a11y buildsucceeds.plugins/a11y/distfor external imports ofaxe-core/solid-js— zero matches; everything remains inlined.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 foraxe-core/solid-js(only a pre-existing unrelated@nuxt/schemahint).pnpm --filter @devframes/plugin-a11y test(andvitest run plugins/a11y) — 21/21 tests pass.pnpm test(full repo) — flaky failures in unrelated packages (@devframes/hubterminal-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 inplugins/a11y.pnpm typecheck— all 30 packages pass.pnpm build— all 23 packages build successfully (full cache hit).Acceptance criteria
dependenciesof plugin-a11y no longer include axe-core or solid-js.Created with the help of an agent.