Registry / devops / rollup-plugin-auto-reload

rollup-plugin-auto-reload

JSON →
library1.2.1jsnpmunverified

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.

npm install rollup-plugin-auto-reload
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-AUTO
R
rollup-plugin-auto-reload
devopsjavascriptv1.2.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

autoReload
import { autoReload } from 'rollup-plugin-auto-reload'
const autoReload = require('rollup-plugin-auto-reload')
Named export only; package is ESM-only.
Plugin
import type { Plugin } from 'rollup'
import { Plugin } from 'rollup-plugin-auto-reload'
Plugin type is from Rollup, not this package.

Basic Rollup config using autoReload plugin in watch mode to trigger browser refresh.

import { autoReload } from 'rollup-plugin-auto-reload'; export default { input: 'src/index.js', output: { file: 'dist/index.js', format: 'iife' }, plugins: [ autoReload({ port: 35729 }) ] };
Debug
Known issues
breakingVersion 1.x drops support for Rollup 2.x; only Rollup ^3.18.0 || ^4.0.0 is supported.
fix
Upgrade Rollup to ^3.18.0 or ^4.0.0, or stay on rollup-plugin-auto-reload 0.x.
affects: >=1.0.0 <2.0.0
gotchaThe plugin only works in watch mode. It does nothing in non-watch builds.
fix
Use Rollup's --watch flag or add watch option in config.
affects: >=0.0.0
gotchaIf port is set to 0 (default), a random available port is used. The client must connect to that exact port.
fix
Specify a fixed port in options to avoid confusion, especially in production-like setups.
affects: >=0.0.0
deprecatedThe plugin's official GitHub repo is archived; no further updates expected.
fix
Consider migrating to rollup-plugin-livereload or @rollup/plugin-livereload.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-auto-reload'
Package not installed or installed in wrong location.
fix
Run `npm install --save-dev rollup-plugin-auto-reload` in the project root.
TypeError: autoReload is not a function
Trying to use default import instead of named import.
fix
Change `import autoReload from 'rollup-plugin-auto-reload'` to `import { autoReload } from 'rollup-plugin-auto-reload'`.
Error: The plugin is not compatible with rollup version 2
Using rollup-plugin-auto-reload 1.x with Rollup 2.x.
fix
Upgrade Rollup to version 3 or 4, or downgrade the plugin to 0.x.
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies
rolluprequiredPeer dependency: plugin is designed for Rollup's plugin system
Agent activity
8 hits · last 30 days
node
6
Resources
rollup-plugin-auto-reload — npm install rollup-plugin-auto-reload · libregistry