Getting file changes to cause a reload #2089
-
When the dev server is running and I modify a file in a directory. Is there a way to configure Vite so that it reloads the page. Right now, my app reads markdown files to create a slideshow. These are located in /src/slides If I modify one of these files whatever is handling HMR doesn't notice, so I have to do a manual browser refresh. I tried different configuration of the server object.
But that doesn't seem to work. The page reloads fine if I modify sass, js, html files, but evidently not md files. Is there a configuration I'm missing somewhere? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
How do you import markdown files? HMR works fine in my case. // App.vue
import md from './test.md?raw'
console.log(md) https://vitejs.dev/guide/assets.html#importing-asset-as-string |
Beta Was this translation helpful? Give feedback.
How do you import markdown files? HMR works fine in my case.
https://vitejs.dev/guide/assets.html#importing-asset-as-string