{"id":21922,"library":"rollup-plugin-auto-reload","title":"rollup-plugin-auto-reload","description":"Rollup plugin that automatically reloads the browser when watch mode detects changes to bundles. Current stable version is 1.2.1, with slow release cadence. Supports Rollup 3.x and 4.x, requires Node >= 18. It injects a small client-side script to trigger full page reloads, works with any server or file:// protocol. Differentiates from similar plugins (e.g., rollup-plugin-livereload) by its simplicity and zero external WebSocket dependencies in older versions.","status":"active","version":"1.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/pmwmedia/rollup-plugin-auto-reload","tags":["javascript","livereload","reload","plugin","rollup","rollup-plugin","watch","typescript"],"install":[{"cmd":"npm install rollup-plugin-auto-reload","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-auto-reload","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-auto-reload","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: plugin is designed for Rollup's plugin system","package":"rollup","optional":false}],"imports":[{"note":"Named export only; package is ESM-only.","wrong":"const autoReload = require('rollup-plugin-auto-reload')","symbol":"autoReload","correct":"import { autoReload } from 'rollup-plugin-auto-reload'"},{"note":"Plugin type is from Rollup, not this package.","wrong":"import { Plugin } from 'rollup-plugin-auto-reload'","symbol":"Plugin","correct":"import type { Plugin } from 'rollup'"}],"quickstart":{"code":"import { autoReload } from 'rollup-plugin-auto-reload';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/index.js',\n    format: 'iife'\n  },\n  plugins: [\n    autoReload({ port: 35729 })\n  ]\n};","lang":"typescript","description":"Basic Rollup config using autoReload plugin in watch mode to trigger browser refresh."},"warnings":[{"fix":"Upgrade Rollup to ^3.18.0 or ^4.0.0, or stay on rollup-plugin-auto-reload 0.x.","message":"Version 1.x drops support for Rollup 2.x; only Rollup ^3.18.0 || ^4.0.0 is supported.","severity":"breaking","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Use Rollup's --watch flag or add watch option in config.","message":"The plugin only works in watch mode. It does nothing in non-watch builds.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Specify a fixed port in options to avoid confusion, especially in production-like setups.","message":"If port is set to 0 (default), a random available port is used. The client must connect to that exact port.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider migrating to rollup-plugin-livereload or @rollup/plugin-livereload.","message":"The plugin's official GitHub repo is archived; no further updates expected.","severity":"deprecated","affected_versions":">=0.0.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 --save-dev rollup-plugin-auto-reload` in the project root.","cause":"Package not installed or installed in wrong location.","error":"Error: Cannot find module 'rollup-plugin-auto-reload'"},{"fix":"Change `import autoReload from 'rollup-plugin-auto-reload'` to `import { autoReload } from 'rollup-plugin-auto-reload'`.","cause":"Trying to use default import instead of named import.","error":"TypeError: autoReload is not a function"},{"fix":"Upgrade Rollup to version 3 or 4, or downgrade the plugin to 0.x.","cause":"Using rollup-plugin-auto-reload 1.x with Rollup 2.x.","error":"Error: The plugin is not compatible with rollup version 2"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}