N
Nuxt5d ago
tb13

Using nuxt3 content module

Is it possible to have hot reloading with nuxt conent module version 3 in production? Or do you always have to build the nuxt app again when you push new items into the content/ folder?
3 Replies
kapa.ai
kapa.ai5d ago
Hi @tb13. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources, Nuxt Content v3 doesn't support hot reloading in production environments. The hot reload functionality is specifically designed for development purposes. According to the configuration documentation:
The watcher is a development feature and will not be included in production.
Configuration docs In production, Nuxt Content v3 uses an SQL-based storage system that loads content during the build process. When you add new content to your content/ folder, you'll need to rebuild your application to make those changes visible in production. For static sites, Nuxt Content will pre-render all pages during the build process using the nuxi generate command, creating static files in the dist/ directory that you can upload to any static hosting service. Static Hosting docs For server-rendered applications, the content is loaded into the SQL database during the build/startup phase, and there's no built-in mechanism to automatically detect and reload new content files without rebuilding or restarting the application. If you need to update content frequently without rebuilding, you might want to consider using a headless CMS like Strapi that can be integrated with Nuxt, rather than relying solely on the file-based content approach. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5d ago
<@1103319221309546527> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Kal
Kal4d ago
Just a picky thing.... the term "hot reload" is almost always explicitly used in the literal context of a developer's local environment when working on a website or web app. Whereas your question is more about simple content updates (in a website or web app) without requiring rebuild & redeploy. I wouldn't use the term "hot reload" in this context, to save yourself confusion in future conversations. What is an alternative term to describe the idea, I don't know.

Did you find this page helpful?