{"id":22769,"library":"vite-plugin-page-reload","title":"vite-plugin-page-reload","description":"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.","status":"active","version":"0.2.3","language":"javascript","source_language":"en","source_url":"https://github.com/barrel/shopify-vite","tags":["javascript","typescript"],"install":[{"cmd":"npm install vite-plugin-page-reload","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-page-reload","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-page-reload","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin requires Vite as the dev server","package":"vite","optional":false}],"imports":[{"note":"Default export; ESM-only since v0.2.0. CommonJS require will fail.","wrong":"const pageReload = require('vite-plugin-page-reload')","symbol":"pageReload","correct":"import pageReload from 'vite-plugin-page-reload'"},{"note":"Type export for TypeScript users; do not use value import.","wrong":"import { PageReloadOptions } from 'vite-plugin-page-reload'","symbol":"PageReloadOptions","correct":"import type { PageReloadOptions } from 'vite-plugin-page-reload'"},{"note":"Type export for the plugin type; value import will be undefined.","wrong":"import { PageReloadPlugin } from 'vite-plugin-page-reload'","symbol":"PageReloadPlugin","correct":"import type { PageReloadPlugin } from 'vite-plugin-page-reload'"}],"quickstart":{"code":"// vite.config.js\nimport { defineConfig } from 'vite'\nimport pageReload from 'vite-plugin-page-reload'\n\nexport default defineConfig({\n  plugins: [\n    pageReload('/tmp/theme.update', {\n      always: true,\n      delay: 50,\n      log: true\n    })\n  ]\n})","lang":"javascript","description":"Configure Vite to reload the browser when /tmp/theme.update is modified, with a 50ms delay and logging enabled."},"warnings":[{"fix":"Update import from `import { pageReload }` to `import pageReload`","message":"Default export changed from object to function in v0.2.0","severity":"breaking","affected_versions":"<0.2.0"},{"fix":"Use v0.2.1 if you need Vite 4 support","message":"Vite 4 support dropped in v0.2.2","severity":"breaking","affected_versions":">=0.2.2"},{"fix":"Use absolute paths or ensure root matches your project structure","message":"Paths are relative to root option, default process.cwd(). Glob patterns supported but not documented.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Keep `always: true` (default) to ensure reload on any watched file change","message":"Setting `always: false` may cause inconsistent reloads when multiple files change simultaneously","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Remove `watchOptions` and `ignore`; configure via `always` and `paths`","message":"Options `watchOptions` and `ignore` have been removed in v0.2.0. Use `always` and `paths` instead.","severity":"deprecated","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `npm install -D vite-plugin-page-reload` and ensure tsconfig includes node_modules resolution.","cause":"Package not installed or TypeScript cannot resolve types.","error":"Cannot find module 'vite-plugin-page-reload' or its corresponding type declarations."},{"fix":"Change to `import` statement or use dynamic import(). Ensure your project is ESM by adding `\"type\": \"module\"` to package.json.","cause":"Using CommonJS require() to import an ESM-only package.","error":"ERR_REQUIRE_ESM: require() of ES Module ... not supported."},{"fix":"Change `import { pageReload }` to `import pageReload`.","cause":"Using named import instead of default import.","error":"TypeError: pageReload is not a function"},{"fix":"Use `import type { PageReloadOptions } from 'vite-plugin-page-reload'`","cause":"Importing a type as a value.","error":"The requested module 'vite-plugin-page-reload' does not provide an export named 'PageReloadOptions'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}