localhostess
Nuxt3 favicon
I just use an svg in my projects, so its scalable to any size
nuxtConfig:
Put the image in the
/public
dir
https://nuxt.com/docs/api/nuxt-config#head4 replies
Auto Importing Issue
Thre’s two types
- client: middleware method that runs before a pages navigation - https://nuxt.com/docs/guide/directory-structure/middleware
- server: middleware method that runs before a server route - https://nuxt.com/docs/guide/directory-structure/server#server-middleware
your first screenshot is for the server route, since it shows in your server folder
your second doc link is for the pages route.
what are you trying to do?
8 replies
Preventing Refetching in Component
Alex explains it here, pretty cool! https://www.youtube.com/watch?v=aQPR0xn-MMk
6 replies
Why does ssr/ssg client navigation change the page source?
Isn’t only the first request rendered server side (index), then subsequent navigation in-app is rendered like a SPA? thats why i’m wondering why the page source changed for /test.
***
oh sorry, i get what is happening:
right click -> view source opens a new browser tab which becomes a server request to the page:
view-source:http://localhost:3000/test
even if the original request was client side, opening that window is a server request so the js will show there.4 replies
Hydration mismatch for breakpoints
Thanks for the response! That would work in an individual component. Lets say in my nuxt layout.vue, i wanted to load various components for a mobile experience, or other ones for desktop. Before, in nuxt2 i would just setup the isMobile ref that gets the viewport width, and a resize listener to listen for viewport size to render one experience or the other. What would be the preferred way to handle this ya think?
6 replies