-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
nitrojs/nitro
#3804Description
Which project does this relate to?
Start
Describe the bug
The notFoundComponent defined in src/routes/__root.tsx is not rendered when using nitro@3.0.1-alpha.1, but it does work if we're not using the nitro/vite plugin.
Instead of displaying the notFoundComponent, it displays:
// vite.config.ts
import { nitro } from "nitro/vite"
export default defineConfig({
plugins: [
nitro(),
tanstackStart(),
// ...
],
})However, if we don't use the nitro() plugin, it works, and correctly display notFoundComponent:
// vite.config.ts
export default defineConfig({
plugins: [
tanstackStart(),
// ...
],
})Your Example Website or App
https://github.com/theoludwig/tanstack-repro-not-found
Steps to Reproduce the Bug or Issue
git clone git@github.com:theoludwig/tanstack-repro-not-found.git(project created withpnpm create tanstack-app@latest)- cd
tanstack-repro-not-found pnpm install --frozen-lockfilenode --run dev- Go http://localhost:3000/abc for example, it should shows the issue and display:
Cannot GET /abc. (404 not working as expected) - Edit
vite.config.tsto remove thenitro()plugin, refresh the page http://localhost:3000/abc, and the 404 should work correctly.
Expected behavior
The notFoundComponent defined in src/routes/__root.tsx should be used even when using the nitro v3 plugin.
Screenshots or Videos
No response
Platform
- Router / Start Version: v132
- Bundler: vite
Additional context
I don't know if this is a Nitro issue or a TanStack Router/Start issue.
jeanzuckpetercinibulk
Metadata
Metadata
Assignees
Labels
No labels