Add nitro 3.0.261103-rc, so Nuxt 4.7 builds the server with Nitro v3.
- Server routes and middleware import from nuxt/server and read the
request through event.req, event.url and event.res.headers; h3 and
nitropack are no longer direct dependencies.
- The registry lookup reads the Workers ASSETS binding from
event.req.runtime.cloudflare (Nitro v3) or event.context.cloudflare.
- Drop the static Content-Security-Policy route rule: Nitro v3 applies
rule headers after the handler, so it replaced nuxt-security's
per-request nonce CSP on every worker-rendered page.
- Patch @nuxt/content 3.17.0 with the fix from nuxt/content#3928: its
/raw/**:slug.md route is invalid for rou3.
- Run dev in a node worker; the Miniflare dev runner cannot start the
app yet (nitrojs/nitro#4621).
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
🔗 Linked issue
❓ Type of change
📚 Description
when testing a project on Nitro v3 (the Nuxt 4.7 opt-in, and the default in Nuxt 5),
nuxt preparefails as soon as the llms integration is enabled:that's because rou3 1.0 ends a param name at the first character that isn't a letter, digit or underscore, which means
**:slug.mdisn't a valid route there. radix3 accepts it and names the paramslug.md, which is why it's been fine on Nitro 2.this PR registers the raw markdown handler on
/raw/**:slugfor Nitro 3, and both handlers read the path from either param name.on Nitro 2 we keep the old route for now. with the new one,
addServerHandlerin kit 4.6.4 also registers the handler on /raw itself, so a page at /raw would start returning a 404. that's fixed in nuxt/nuxt#37155 and I've left a TODO to drop the special case once we require a kit release that includes it.responses from a small docs project
with v3.17.0, the Nitro 3 build fails with the error above.
📝 Checklist