Replies: 2 comments
-
I have this problem too - I have a mock API yaml file which I want to cause a reload on the frontend in dev mode. I found this in the docs: https://vite.dev/config/build-options.html#build-watch -> https://rollupjs.org/configuration-options/#watch-include
I'm not sure how to solve this. But it shows that using Related SO answer here: https://stackoverflow.com/a/63548394/9889773 |
Beta Was this translation helpful? Give feedback.
-
I found a solution in install vite-plugin-restart. I hope this helps. // vite.config.js
import ViteRestart from 'vite-plugin-restart'
export default {
plugins: [
ViteRestart({
restart: [
'./vite.config.ts',
]
})
],
} there are similar issues. |
Beta Was this translation helpful? Give feedback.
-
I thought I could use this to watch the vite.config.ts file so that everything reloads when that file changes, but it actually doesn't trigger any changes.
My config file:
To build and watch, I use the command:
vite build --mode='development' --watch
.What am I missing? How do I tell vite to watch other files in the project directory and trigger a rebuild when they change?
Beta Was this translation helpful? Give feedback.
All reactions