Help with nested and dynamic routes pages

Hello everyone i had an issue with my app in production server, where i refresh the dynamic route its return a 404... i attach exxample images this are my page structure: pages/ └── order-service/ └── technician/ └── details/ └── [_technicianId]/ └── [_orderId].vue then when a try to refresh and redirect directly from a link its return a 404 not found. i upload the .output from npx nuxi generate. i hope you can help me, please :C thank you!
No description
No description
No description
5 Replies
manniL
manniL5mo ago
do you prerender your routes / build via generate?
charles1410
charles1410OP5mo ago
no, how can i prerender routes? the showed route is dynamic in time because its open by a sent email (_techinicanId and _orderId)
manniL
manniL5mo ago
let me ask differently how do you build and deploy
charles1410
charles1410OP5mo ago
i build with npx nuxi generate and deploy the .output in the server i set the prerender config:
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
"@pinia/nuxt",
"@vueuse/nuxt",
"@nuxtjs/tailwindcss",
"nuxt-icon",
],


routeRules: {
"/order-service/technician/details/**": { prerender: true },
},
});
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
"@pinia/nuxt",
"@vueuse/nuxt",
"@nuxtjs/tailwindcss",
"nuxt-icon",
],


routeRules: {
"/order-service/technician/details/**": { prerender: true },
},
});
manniL
manniL5mo ago
Well, then you can only prerender what is available at the time of building You can set up your server to render dynamic routes as SPA though By rendering the 404.html as error document for example
Want results from more Discord servers?
Add your server