Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Vitest browser mode: `resolve.conditions` is missing `'browser'`

Open Beginner friendly
#1,842 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nuxt, typescript, vite
Domain
testing

Research direction

Start in src/config.ts and compare the configured resolve.conditions with Vite’s defaults. Reproduce the reported browser-mode failure using the linked StackBlitz example or the project’s relevant tests. Done means browser-specific package files resolve correctly and the existing test suite still passes.

Written by the indexing model from the issue text.

Description

pending triage
Reproduction

https://stackblitz.com/edit/github-sbsck7pd

Describe the bug

In src/config.ts the resolve.conditions are set to ['web', 'import', 'module', 'default']. One of the Vite default options 'browser' is missing. This makes packages load files that should not be loaded in a browser environment.

In the reproduction the package @msw/interceptor tries to load files but run into errors.

Additional context
  • Found by Claude
  • I could have opened an MR directly, but because the Nuxt test utils are quite complex, I wasn't sure if the simple change would be correct and/or enough
Workaround

As a workaround you can add the following to the Vite/Vitest config:

resolve: { 
  conditions: ['browser'],
},

Vite deeply merges config options from plugins into the user configuration.

Dominant language
TypeScript
Stars
440
Forks
120
Avg merge
5d 22h
Merged PRs (30d)
22

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 nuxt/test-utils

All issues in nuxt/test-utils

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.