Shiri
Shiri
NNuxt
Created by Shiri on 8/14/2024 in #❓・help
Wrong paths in @import of less files.
Hello, I'm trying to convert my old Webpack project to Vite. I'm using Framework7 in my project and I have problem with its less files. In framework7 core files (inside node_modulse) there are imports like
import url(./app-vars.less)
import url(./app-vars.less)
Its trying to resolve it as
../../node_modules/framework7-v575/components/app/app-vars.less
../../node_modules/framework7-v575/components/app/app-vars.less
instead of
node_modules/framework7-v575/components/app/app-vars.less
node_modules/framework7-v575/components/app/app-vars.less
Can you help me with how to fix this?
1 replies
NNuxt
Created by Shiri on 8/7/2024 in #❓・help
Different behaviour of build on server vs preview (localhost)
Hello, I'm facing problem with different behaviour of same build. On localhost (preview) its working as expected. Servers document response is fully rendered before hitting the client. But on production server only part of the web (looks like only layout - nav and footer, is rendered but page - index.vue which use async data is missing) is comming as response and rest is handeled on clinet which creates a lot of Comulative Layout Shift and wierd visuals. Do you know what is the issue here? Or atleast point me in the right direction what to look for?
3 replies
NNuxt
Created by Shiri on 6/19/2023 in #❓・help
Reusable changeable modules (parts of app)
Hello, I need to create separated parts of the app ("modules"). For example: shop module with cart etc., library module (where you can see your purchased stuff). But I want it to be as much reusable and separated as possible. This "modules" should be easily used with enother design (restyled, another layout) and alsou standalone. I want to do a mutation of this app, but sometime there will be only library, sometime ther will be shop+library etc.. I'm thinking of using extends, but I'm not sure how to do it propperly. Mainly the "style" part, because I don't want to change just css but also html layout. Should I do it with use of renderelss components or any other way? Can somebody point me to right direction? Thanks.
1 replies
NNuxt
Created by Shiri on 5/25/2023 in #❓・help
SWR problem (or cache problem)
Hello, I have a problem on my website with cached content. Can somebody explaine me how the SWR should work or where is my problem. I have a blog with articles, articles are fetched by useAsyncData from API. When I do change in the article in the backend the change is visible when I use router within the app (cliend side). But when I go directly to the URL (SSR) it shows old content (from the First time I visited it). My routeRules is set like this:
routeRules: {
"/**": { swr: 60 },
},
routeRules: {
"/**": { swr: 60 },
},
With this, I assumed it should update after 60 second after first visit (or even maybe in between on background), but it wont. Can somebody explane to me where is the problem? Or did I get working of SWR wrong? Using Nuxt 3.5.1 with Nitro 2.4.1
17 replies
NNuxt
Created by Shiri on 4/27/2023 in #❓・help
Best practices with useAsyncData and route blocking
Hello, I'm really struggeling with right aproach of SSR and data fetching. I'm fetching data from API in useAsyncData, but I have NuxtLayout inside app.vue. So the result is layout is loaded, but page is empty untill useAsyncData is finished. It can be solved by putting NuxtLayout inside pages instead of app. But then it hase sometimes wierd behiviour. For example if I press back button in browser, its switch the route imidiatly and then for a few moments there is a content from the old page. How to solve this issue or what is the right aproach? If better way is to not block the route, what is the best practice to show loader on client side redirect but render data on SSR. Thanks for any advices.
1 replies