content icon indicating copy to clipboard operation
content copied to clipboard

markdown doesn't reload in devcontainer

Open endquote opened this issue 1 year ago • 3 comments

Environment


  • Operating System: Linux
  • Node Version: v22.9.0
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

Reproduction

  • clone https://github.com/endquote/vue-content-reload
  • pnpm i; pnpm run dev
  • open localhost:3000
  • edit content/index.md, content changes in browser
  • edit pages/[...slug].vue, content changes in browser
  • close server, open in vscode, should get prompted to open in devcontainer
  • pnpm run dev
  • open localhost:3000
  • edit content/index.md, content does not change in browser
  • edit pages/[...slug].vue, content does change in browser

Describe the bug

In a vscode devcontainer, changes to markdown files do not trigger hot reload. But changes to .vue files do.

Additional context

No response

Logs


endquote avatar Nov 26 '24 19:11 endquote

Seems that listhen does not emit upgrade event inside the dev container, therefore web socket is not able to broadcast events.

One solution is to drop listhen and directly use ws server here https://github.com/nuxt/content/blob/34f8d071d7979d0f8b5384503f588e8dcb78b48f/src/utils.ts#L126

farnabaz avatar Nov 28 '24 10:11 farnabaz

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Feb 10 '25 15:02 github-actions[bot]

This issue is still present. I need to restart my docker container every time I change something in the markdown files. Even a normal reload does not show the new content.

pasloc avatar Jul 30 '25 12:07 pasloc