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 2 months ago
JSON representation

Custom files/globs to restart Vite server

Lists

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)