Files
Robin Malfait c56200d0c4 Fix the Nuxt dev mode integration test (#20564)
## Summary

The `vite/nuxt.test.ts > dev mode` integration test fails on `main` on
Linux, macOS and Windows since Vite 6.4.4 (released on 2026-10-06). The
SSR render of `/` crashes, so the page has no styles:

```
[GET] "http://[::1]:3000/__nuxt_vite_node__/module//node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs": 403 Forbidden
```

Nuxt 3.16.0 serves vite-node modules over HTTP. For each module id, it
calls Vite's `isFileServingAllowed(config, id)`. These ids are
root-relative URLs, like `/node_modules/.pnpm/...`. Before Vite 6.4.4,
the import analysis plugin added these URLs to `safeModulePaths`, so the
check passed. Vite 6.4.4 adds the resolved file paths instead
(https://github.com/vitejs/vite/pull/23656), so the check now rejects
the root-relative ids.

All Nuxt versions before 3.18.0 do this check. Nuxt 3.18.0 and later
serve vite-node modules over an IPC socket without it. This PR moves the
test to Nuxt 3.21.11, the latest 3.x release. It runs on Vite 7.3.7,
which has the same `safeModulePaths` change.

It also removes the `nitropack: 2.11.0` pin. Nuxt 3.21 gets Nitro
through `@nuxt/nitro-server` (`nitropack@^2.13.4`), so nothing used the
pinned copy.

## Test plan

Locally on macOS, with `pnpm vitest --root=./integrations run
vite/nuxt.test.ts`:

- Nuxt 3.16.0 and Vite 6.4.4: `dev mode` fails with the same 403 as CI.
- Nuxt 3.16.0 with a `vite: 6.4.3` override: both tests pass. This
confirms the cause.
- Nuxt 3.21.11: both tests pass in 3 of 3 runs, with and without the
`nitropack` pin.

CI checks Linux and Windows.

[ci-all]
2026-10-12 17:12:14 +02:00
..