Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/IndexXuan/vite-plugin-sleep
a vite plugin you never need. slow devServer and slow HMR.
https://github.com/IndexXuan/vite-plugin-sleep
vite vite-plugin
Last synced: about 2 months ago
JSON representation
a vite plugin you never need. slow devServer and slow HMR.
- Host: GitHub
- URL: https://github.com/IndexXuan/vite-plugin-sleep
- Owner: IndexXuan
- License: mit
- Created: 2021-05-10T11:58:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-12T07:41:34.000Z (over 3 years ago)
- Last Synced: 2024-07-29T03:24:28.330Z (5 months ago)
- Topics: vite, vite-plugin
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 81
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vite-plugin-sleep
> vite is too fast, we need to rest. a vite-plugin you never need.
## Motivation
- In the old days with webpack, we had many times when we could compile with pay, and with vite it was so fast that we couldn't rest.
- Time to take a nap in the vite.## Usage
```sh
yarn add vite-plugin-sleep
``````ts
// vite.config.ts
import sleep from 'vite-plugin-sleep'/** @see {@link https://vitejs.dev/config/} */
export default defineConfig({
plugins: [
// ...other plugins
sleep(/* options */),
],
})
```## Options
```ts
{
/**
* DevServer start delay(ms)
* @default 20000
*/
devServerStartDelay: number
/**
* HMR delay(ms)
* @default 3000
*/
hmrDelay: number
}