Custom files/globs to restart Vite server
Install
npm i vite-plugin-restart -D # yarn add vite-plugin-restart -DAdd it to vite.config.js
// vite.config.js
import ViteRestart from 'vite-plugin-restart'
export default {
plugins: [
ViteRestart({
restart: [
'my.config.[jt]s',
]
})
],
}Changes to my.config.js or my.config.ts will now restart the server automatically.
Byebye nodemon -w my.config.js -x 'vite'
MIT License © 2021 Anthony Fu