nuxt-modules / nuxt-modules/ionic
fix: server side fetch
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 457
- Forks
- 53
- Avg merge
- 7h 32m
- Merged PRs (30d)
- 21
Description
🐛 The bug
Fetching data on server side within ionic page component is not possible.
It can be observed in the repro attached that the fetch call happens on the client side only and therefore updating meta tags will have no effect for SEO, social media previews, etc
Server side code executes only in app.vue as far as I can see
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-gjtb8z?file=pages%2Fhead.vue
🌈 Expected behaviour
It's possible to provide code that's executed server side before entering the page.
ℹ️ Additional context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction at pages/head.vue and compare it with the server-side execution described for app.vue. Trace why the fetch runs only on the client in the Ionic page component. Done means page-level code can execute server-side before navigation and the resulting metadata is available for SEO and social previews.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, typescript
- Domain
- frontend, mobile, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100