SzaDave 👽
How to Enable Vue Vapor Mode globally in Nuxt?
Hi everyone,
I’m looking to enable Vue’s Vapor Mode in my Nuxt project globally. Does anyone have experience with this or know the steps involved? Any guidance or documentation links would be greatly appreciated!
Thanks in advance!
1 replies
How to use different page (.vue) files for a Nuxt route depending on the client / server?
Hi everyone,
I have a route for my products at '/product/[id]' and I want to implement a feature where if a user clicks on a product from the product listing, it should open in a modal (ProductModalPage.vue). However, if the user comes directly to the route from Google or types it into their browser, it should use another page file (ProductDirectPage.vue).
I want to achieve this by checking if the process is running on the client or the server side. If it is running on the client, I want to use ProductModalPage.vue, and if it is running on the server, I want to use ProductDirectPage.vue.
Shortened:
Route: '/product/[id]'
if (process.client) -> use "ProductModalPage.vue" // Maybe a nuxt child over the listing?
if (process.server) -> use "ProductDirectPage.vue"
Can you please suggest the best way to achieve this using Nuxt? Thank you!1 replies
Need Help with Nuxt Middleware: Unexpected Behavior with navigateTo() Function
Hey everyone,
I tried to implement an authentication flow to my Nuxt app, but I got stuck at the authentication middleware. When I use "return navigateTo('/')", the code after the middleware still runs. Is it normal for the navigateTo function to behave this way in a middleware?
If I use "return '/'" instead, it works as expected, but I'm not sure if this is a reliable solution:
8 replies