vite-plugin-page-reload
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

vite-plugin-page-reload

Automatically reload the page when watched files change during development with Vite.

// vite.config.js
import pageReload from 'vite-plugin-page-reload'

export default {
  plugins: [
    pageReload('/tmp/theme.update')
  ]
}

Configuration

paths

Type: string | string[]

File paths (or globs) to watch for changes. The page will reload when any of these files change.

always

Type: boolean

Default: true

Reload the page regardless of the modified file.

delay

Type: number

Default: 25

Milliseconds to wait before reloading after a change.

log

Type: boolean

Default: true

Log file change-triggered reloads.

root

Type: string

Default: process.cwd()

Resolve paths against this directory.

Acknowledgements

This plugin is based on the ideas from the following projects and extends their functionality with the addition of a debounce function:

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-page-reload

Weekly Downloads

2,751

Version

0.2.1

License

MIT

Unpacked Size

5.39 kB

Total Files

5

Last publish

Collaborators

  • westurner