Skip to content

Conversation

@hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Nov 6, 2025

Description

Resolves #8899

I think what's happening is that config.ssr.noExternal: ["something"] and config.environments.ssr.resolve.noExternal: true are getting merged to noExternal: ["something", true] right after Vitest's config hook. This PR workarounds it by clearing it out so they become noExternal: true.

Either we workaround on Vitest or backport vitejs/vite#20502 to Vite 6, which might be equally simple though.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 342b3ee
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/690c5f52ee9e1700086a4521
😎 Deploy Preview https://deploy-preview-8950--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 6, 2025

@vitest/browser

npm i https://pkg.pr.new/@vitest/browser@8950

@vitest/browser-playwright

npm i https://pkg.pr.new/@vitest/browser-playwright@8950

@vitest/browser-preview

npm i https://pkg.pr.new/@vitest/browser-preview@8950

@vitest/browser-webdriverio

npm i https://pkg.pr.new/@vitest/browser-webdriverio@8950

@vitest/coverage-istanbul

npm i https://pkg.pr.new/@vitest/coverage-istanbul@8950

@vitest/coverage-v8

npm i https://pkg.pr.new/@vitest/coverage-v8@8950

@vitest/expect

npm i https://pkg.pr.new/@vitest/expect@8950

@vitest/mocker

npm i https://pkg.pr.new/@vitest/mocker@8950

@vitest/pretty-format

npm i https://pkg.pr.new/@vitest/pretty-format@8950

@vitest/runner

npm i https://pkg.pr.new/@vitest/runner@8950

@vitest/snapshot

npm i https://pkg.pr.new/@vitest/snapshot@8950

@vitest/spy

npm i https://pkg.pr.new/@vitest/spy@8950

@vitest/ui

npm i https://pkg.pr.new/@vitest/ui@8950

@vitest/utils

npm i https://pkg.pr.new/@vitest/utils@8950

vitest

npm i https://pkg.pr.new/vitest@8950

@vitest/web-worker

npm i https://pkg.pr.new/@vitest/web-worker@8950

@vitest/ws-client

npm i https://pkg.pr.new/@vitest/ws-client@8950

commit: 0af4a14

@hi-ogawa hi-ogawa marked this pull request as ready for review November 6, 2025 09:19
@sheremet-va
Copy link
Member

LGTM, I think the fix for Vite 6 can also be bakported

@sheremet-va sheremet-va merged commit bcb132f into vitest-dev:main Nov 6, 2025
13 of 15 checks passed
@ascorbic
Copy link

ascorbic commented Nov 6, 2025

Thanks @hi-ogawa

@hi-ogawa hi-ogawa deleted the 11-06-fix_workaround_noexternal_merging_bug_on_vite_6 branch November 7, 2025 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vitest 4 broke Astro tests ("filename.replace is not a function")

3 participants