slidev
slidev copied to clipboard
Two dev servers on the same port cause setup functions wrongly loaded
Describe the bug
Sometimes, the initial run of the dev
preview does not load custom code-runner
implementations.
Minimal reproduction
Steps to reproduce the behavior:
- Execute
npm run dev
while having VSCode extension preview tab active - Attempt to manually run / auto-run a non-standard monaco runner
- See
Error: Runner for language "<lang>" not found
on one of the presentations (in-editor or in-browser)
See slidev-code-runner for an example with a custom Python implementation in ./setup/code-runners.ts
Environment
- Slidev version: v0.49.26 (using
npm create slidev@latest
) - Browser: Chrome
- OS: Windows 10
Notes
This issue only occurs sometimes on the initial load of the dev
preview, any subsequent loads after making edits to the project are fine. The built version of the project also appears to be fine.