Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown doesn't reload in devcontainer #2873

Open
endquote opened this issue Nov 26, 2024 · 1 comment
Open

markdown doesn't reload in devcontainer #2873

endquote opened this issue Nov 26, 2024 · 1 comment
Labels
bug Something isn't working v2 Relevant for @nuxt/content v2

Comments

@endquote
Copy link

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 endquote added the v2 Relevant for @nuxt/content v2 label Nov 26, 2024
@farnabaz farnabaz added the bug Something isn't working label Nov 28, 2024
@farnabaz
Copy link
Member

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

const wss = new WebSocketServer({ noServer: true })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2 Relevant for @nuxt/content v2
Projects
None yet
Development

No branches or pull requests

2 participants