Guidance on axe-core browser bundle size with Storybook/Vite 8

Open
#5,569 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, storybook, vite

Research direction

Start by reading related issues #5176 and #5156, then inspect the Storybook accessibility addon's existing dynamic import of axe-core and its browser bundle packaging. The report has no public reproducer, so first establish whether the reported chunk size can be reproduced with a minimal public setup. Done means providing a supported way to budget or reduce bundle size while preserving the complete rules engine and audit semantics.

Written by the indexing model from the issue text.

Description

Is there a supported way to reduce or appropriately budget the size of axe-core when bundled by Storybook's accessibility addon with Vite 8/Rolldown, without disabling or reducing accessibility coverage?

This is a request for guidance, not a claim of a functional bug or demonstrated runtime performance regression.

Environment

  • Storybook / @storybook/react-vite: 10.6.2
  • @storybook/addon-a11y: 10.6.2
  • axe-core: 4.13.0
  • Vite: 8.3.3 (Rolldown)
  • React: 19.3.0
  • Node.js: 24.21.0

Observations

The existing Storybook static build emitted a warning for JavaScript chunks exceeding the default 500 kB threshold.

  • Original axe chunk: 573.2 KiB raw / 154.7 KiB gzip.
  • Installed axe.min.js: 580,491 bytes.
  • Installed axe.js: 1,305,279 bytes.
  • The Storybook accessibility addon already uses dynamic import("axe-core").
  • An experimental Rolldown codeSplitting.groups configuration with a 440 KiB target produced an axe chunk of 586,899 bytes, and the warning remained.

The experimental configuration was reverted. Browser request timing and runtime performance were not measured.

Questions

  1. Is there a supported smaller or modular browser distribution suitable for Storybook integrations?
  2. Is there an upstream bundle-size budget or recommended approach for consumers using the complete axe-core rules engine?
  3. Could future ESM packaging improve bundler optimization without excluding accessibility rules or changing audit semantics?

Related upstream discussions: #5176 (performance budgeting) and #5156 (ESM distribution).

Constraints

We need to preserve full accessibility coverage. We do not want to patch vendored code, depend on external CDNs, or merely increase the chunk-size warning limit.

The measurements originate from a private design-system workspace; a public minimal reproducer is not yet available.

Thank you for guidance on a supported approach.

Dominant language
HTML
Stars
7.8k
Forks
998
Avg merge
2d 22h
Merged PRs (30d)
16

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dequelabs/axe-core

All issues in dequelabs/axe-core

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.