N
Nuxt13mo ago
Gobbo

Dynamic routing with static site generation (S3)

I have a route currently that has a dynamic path param - auth - index.vue - [client].vue However, with the deployment generate and an S3 Deployment, I can't access the dynamic path parameter page, any clue on what I could do? It's dynamic for a reason so I can't predefine it
4 Replies
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Gobbo
GobboOP13mo ago
I’ll give that a shot :) That seems to generate server files, I want to deploy a static site :)
MrBoon765
MrBoon7657mo ago
hello @Gobbo have you found a solution to this? i also have this problem
Gobbo
GobboOP7mo ago
yeah, I had to specify a "hook" hooks: { async 'nitro:config'(nitroConfig) { // fetch the routes from our function above const slugs = await getClients(); // add the routes to the nitro config if (!nitroConfig) return nitroConfig.prerender!.routes!.push(...slugs); }, }, essentially getClients are my slugs I know will exist and then I had to specifically tell the prerenderer, however this doesn't really m ake it dynamic so it's not a great solution, but I believe it was an AWS issue rather than a nuxt issue as locally I think it let me route to anything I wanted
Want results from more Discord servers?
Add your server