Reload Vite for plugin development
npm i vite-plugin-reload --save-dev
import VitePluginReload from 'vite-plugin-reload'
export default defineConfig({
plugins: [
// ... etc
VitePluginReload({
includes: [
'../src/**/*', // directory for plugin development
],
}),
],
// ...etc
})
- Array of files, directories, or glob patterns for tracking.
- Default:
[]
- Example:
['../src/**/*']
- Delay in milliseconds to wait before reloading.
- Default:
500
- Example:
500