Layout route with `routeFilePrefix `
I'm using vite plugin to generate routes from files
How do I create layout route when using
routeFilePrefix?
I have following folder structure?
Basically I want all routes under +workers to be inside wrapped by +_layout route and display 404 if it's not matched. I can't seem to get it working...
Example:
1. If I visit /workers/dashboard/ -> +workers/+dashboard/+index.tsx (inside +_layout)
2. If I visit /workers/ -> display 404
It works like this
But it makes /workers -> a valid route which will display empty page but I want it to be 404 in this case
My +_layout route:
Here's my config:
1 Reply
grumpy-cyanOP•2y ago
Ok, we can do it like this: