slidev
slidev copied to clipboard
VSCode Extension doen't sync preview and imported document
Describe the bug
I have a multimedia.md slides document with every section imported from a file in pages directory. Then changes in those documents don't update the preview. Only it is updated when I go to the main document and press Ctrl+S to try to save it.
Does this also happen when accessing localhost:3030 directly in your browser?
After some testing, I've found that the problem isn't related to the file being imported, but rather to it being in a subdirectory (for example, ./pages, as in the demo). Specifically:
-
Synchronization of both the main file and the imported files works for both the preview and the browser view if they are in the project's root directory.
-
I haven't been able to get synchronization working for files in project subdirectories, neither in the preview nor in the browser.
-
If the main file is in the root directory, but the imported file is in a subdirectory, the file in the subdirectory isn't updated until a save is forced in the main file, even if it doesn't contain any changes. Saving the main file then synchronizes the imported file in both views.
I am afraid that I can't reproduce the problem. Could you please create a reproduction on https://sli.dev/new?