Skip to content

antfu/vite-plugin-restart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 27, 2024
fd851ba · Nov 27, 2024

History

29 Commits
Jul 14, 2022
Nov 17, 2023
Nov 27, 2024
Nov 27, 2024
Mar 15, 2021
Mar 15, 2021
Mar 15, 2021
Jul 14, 2022
Nov 17, 2023
Nov 27, 2024
Nov 27, 2024
Mar 15, 2021
Nov 17, 2023

Repository files navigation

vite-plugin-restart

Custom files/globs to restart Vite server



Usage

Install

npm i vite-plugin-restart -D # yarn add vite-plugin-restart -D

Add 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.

Motivation

Byebye nodemon -w my.config.js -x 'vite'

License

MIT License © 2021 Anthony Fu