N
Nuxt3w ago
djmtype

Update HMR

Using Nuxt Content v3.8.1, when I update a any markdown file within a directory of content, example: content/services it doesn't update in the browser until I restart my local server. BTW, not prefetching and routes using Nitro.
2 Replies
kapa.ai
kapa.ai3w ago
Hi @djmtype. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I understand you're experiencing an issue with Hot Module Replacement (HMR) not working for Nuxt Content markdown files. While the knowledge sources don't contain specific information about Nuxt Content v3.8.1 HMR issues, I can see there have been related HMR problems in Nuxt. Based on the knowledge sources, there's a documented case where Nuxt Content's HMR behavior can cause issues. The knowledge sources indicate that "Nuxt Content is calling updateTemplates to update dump and manifest templates and ensure database integrity," which can trigger multiple simultaneous updates. However, the specific issue you're describing about markdown files in the content/services directory not updating without a server restart isn't directly addressed in the provided knowledge sources. Here are a few things you could try based on general HMR troubleshooting patterns mentioned in the knowledge sources: 1. Check your Vite configuration - One user found success by adjusting their Vite server configuration with polling enabled:
vite: {
server: {
watch: {
usePolling: true,
},
},
}
vite: {
server: {
watch: {
usePolling: true,
},
},
}
2. Component naming - Interestingly, one user resolved their HMR issue by changing component naming from PascalCase to lowercase, though this may not be directly related to your content files. I'm sorry, but the knowledge sources do not contain enough specific information about Nuxt Content v3.8.1 HMR issues with markdown files to provide a definitive solution. You may want to check the Nuxt Content documentation or GitHub issues for more specific guidance on this problem. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@710462032679272519> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?