Skip to content

Commit 67a8477

Browse files
committed
docs: update watch option docs
1 parent 1af6adc commit 67a8477

File tree

1 file changed

+7
-34
lines changed

1 file changed

+7
-34
lines changed

docs/content/docs/1.getting-started/3.configuration.md

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -471,47 +471,20 @@ export default defineNuxtConfig({
471471

472472
```ts [Default]
473473
watch: {
474-
enabled: true,
475-
port: 4000,
476-
showURL: false
474+
enabled: true
477475
}
478476
```
479477

480-
Configure content hot reload in development.
478+
Controls whether content hot reloading is enabled during development.
481479

482-
Value:
483-
484-
- `enabled`: Enable/Disable hot reload.
485-
- `port`: Select the port used for the WebSocket server.
486-
- `showURL`: Toggle URL display in dev server boot message.
480+
**Options:**
487481

488-
Nuxt Content uses [listhen](https://github.com/unjs/listhen) to provide a local development server. Check out the [listhen documentation](https://github.com/unjs/listhen#options) for more information.
482+
- `enabled` (`boolean`): Enable or disable hot reloading when editing content files.
483+
- `true` (default): Automatically reloads content changes in your application during development.
484+
- `false`: Disables hot reloading; changes require a manual refresh.
489485

490486
::callout
491-
The watcher is a development feature and will not be included in production.
492-
::
493-
494-
::code-group
495-
```ts [Enabled]
496-
export default defineNuxtConfig({
497-
content: {
498-
watch: {
499-
port: 4000,
500-
showURL: true
501-
}
502-
}
503-
})
504-
```
505-
506-
```ts [Disabled]
507-
export default defineNuxtConfig({
508-
content: {
509-
watch: {
510-
enabled: false
511-
}
512-
}
513-
})
514-
```
487+
The content watcher only runs in development and leverages the Vite dev server to detect content updates and send events to your application for live updates.
515488
::
516489

517490
## `experimental`

0 commit comments

Comments
 (0)