jd_solanki
jd_solanki
NNuxt
Created by jd_solanki on 7/23/2024 in #❓・help
Reduce worker size on Cloudflare ☁
Hi, I was deploying simple site having 6 pages, no API endpoints + Nuxt SEO. While I was deploying it over the edge, I'm getting error from worker size limit (1MB on free plan) which is mentioned in this blog: https://nuxt.com/blog/nuxt-on-the-edge - This is very simple minimal app and still it's taking more than 1MB so how can I inspect and reduce the worker size? - What increses the size of worker so I can take care of it in future?
8 replies
NNuxt
Created by jd_solanki on 4/7/2024 in #❓・help
Optimal way to handle OAuth2 callback without registering route
Hi 👋 I'm building an app where I'm handling OAuth2 callback in page /auth/google/callback.vue which only contains scripts block because I've to make API call to backend from query params I get. However, Because it's a page I've to write template block and also as this is page my nuxt app will get flash of the content due to quick redirection. Hence, What will be the best way to register route handler that will hold up the navigation and don't render anything and just redirects to home page after call finishes without showing temp page in between. I'm trying to use beforeEach guard but I think there can be better way. Also as this is making API call it should be async. Thanks.
5 replies
NNuxt
Created by jd_solanki on 6/16/2023 in #❓・help
How to get full req URL in server plugin & update appConfig that gets carried/reflected to client
Hi 👋 I'm building nuxt template and encoutering strange case where I want to deploy single nuxt app and want to server it from 6 different URL for different demo purposes. Question: How can I get full requested URL in server plugin like domain.com/demo-1/ (I need subpath ("demo-1") my nuxt is serving to). Based on this requested path I want to alter the appConfig from server plugin and want to reflect that config in client app. e.g. demo-1 will have light theme & demo-2 will have dark theme. I tried getting full url but nuxtApp.ssrContext?.event.node.req.url only gives app's route path not requested URL. 🤷 (something like this: https://nuxt.com/docs/getting-started/testing#urlpath)
14 replies