-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Describe the bug
This line that forces noExternal breaks testing Astro components because there are some CommonJS dependencies that can't be run through Vite's module loader.
| environment.resolve.noExternal = true |
Reproduction
https://github.com/HiDeoo/astro-6-vitest-repro
System Info
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 769.50 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.21.1 - /Users/matthew/.volta/tools/image/node/22.21.1/bin/node
Yarn: 1.22.19 - /Users/matthew/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 10.9.4 - /Users/matthew/.volta/tools/image/node/22.21.1/bin/npm
pnpm: 9.15.9 - /Users/matthew/Library/pnpm/pnpm
bun: 1.2.20 - /Users/matthew/.bun/bin/bun
Deno: 2.6.3 - /opt/homebrew/bin/deno
Browsers:
Brave Browser: 140.1.82.166
Chrome: 143.0.7499.147
Chrome Canary: 145.0.7592.0
Firefox: 137.0.2
Safari: 18.6
npmPackages:
vitest: ^4.0.16 => 4.0.16Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- 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.