Flaky Storybook support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 564
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Using Storybook with WXT works perfectly fine UNTIL you try to access browser to any extend. This will lead to weird compilation errors of it trying to access modules. I assume this is an issue with the fake-browser module rather than WXT yet this needs a fix to properly utilize storybook within WXT
Reproduction
Simply use the the storybook example WXT offers and then simply add a browser. access somewhere in a component for example and then "test" it in storybook. Storybook will fail for it.
Steps to reproduce
No response
System Info
System:
OS: macOS 26.0
CPU: (8) arm64 Apple M1 Pro
Memory: 265.28 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /usr/local/bin/node
npm: 10.9.2 - /usr/local/bin/npm
pnpm: 10.11.0 - /usr/local/bin/pnpm
bun: 1.2.15 - ~/.bun/bin/bun
Browsers:
Chrome: 137.0.7151.120
Safari: 19.0
npmPackages:
vite: ^6.3.5 => 6.3.5
wxt: 0.20.7 => 0.20.7
Used Package Manager
pnpm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WXT Storybook example and reproduce the failure after adding a browser. access in a component, using pnpm. Trace the resulting compilation error to determine whether Storybook, WXT, or the fake-browser module is involved; done means the example works in Storybook with that access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- storybook, typescript, vite
- Domain
- build-system, frontend, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100