Automatically reload the page when watched files change during development with Vite. Current stable version is 0.2.3. Release cadence is irregular, with updates primarily to support new Vite major versions (v5, v6, v7, v8). Key differentiator from alternatives (like vite-plugin-live-reload or vite-plugin-full-reload) is the inclusion of a debounce function and a configurable delay. Ships TypeScript types. Commonly used in Shopify theme development setups.
npm install vite-plugin-page-reloadVerified import paths — ran on the pinned version, not inferred.
Configure Vite to reload the browser when /tmp/theme.update is modified, with a 50ms delay and logging enabled.
Update import from `import { pageReload }` to `import pageReload`Use v0.2.1 if you need Vite 4 support
Use absolute paths or ensure root matches your project structure
Keep `always: true` (default) to ensure reload on any watched file change
Remove `watchOptions` and `ignore`; configure via `always` and `paths`
Run `npm install -D vite-plugin-page-reload` and ensure tsconfig includes node_modules resolution.
Change to `import` statement or use dynamic import(). Ensure your project is ESM by adding `"type": "module"` to package.json.
Change `import { pageReload }` to `import pageReload`.Use `import type { PageReloadOptions } from 'vite-plugin-page-reload'`