Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antfu/vite-plugin-restart
Custom files/globs to restart Vite server
https://github.com/antfu/vite-plugin-restart
auto-restart vite vite-plugin
Last synced: about 15 hours ago
JSON representation
Custom files/globs to restart Vite server
- Host: GitHub
- URL: https://github.com/antfu/vite-plugin-restart
- Owner: antfu
- License: mit
- Created: 2021-03-15T16:13:57.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T09:35:47.000Z (about 2 months ago)
- Last Synced: 2025-01-18T11:04:53.616Z (3 days ago)
- Topics: auto-restart, vite, vite-plugin
- Language: TypeScript
- Homepage:
- Size: 256 KB
- Stars: 174
- Watchers: 4
- Forks: 14
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-vite - vite-plugin-restart - Restart the Vite server on file changes. (Plugins / Framework-agnostic Plugins)
- awesome-vite - vite-plugin-restart - Restart the Vite server on file changes. (Plugins / Framework-agnostic Plugins)
README
vite-plugin-restart
Custom files/globs to restart Vite server
## Usage
Install
```bash
npm i vite-plugin-restart -D # yarn add vite-plugin-restart -D
```Add it to `vite.config.js`
```ts
// 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.
## Motivation
Byebye `nodemon -w my.config.js -x 'vite'`
## License
MIT License © 2021 [Anthony Fu](https://github.com/antfu)