Registry / http-networking / rollup-plugin-hot

rollup-plugin-hot

JSON →
library0.1.1jsnpmunverified

HMR (Hot Module Replacement) plugin for Rollup, leveraging SystemJS. Current stable version 0.1.1, released in Aug 2020. This is a proof-of-concept, not production-ready. It forces output format to 'system' during HMR and provides a dev server with proxy support. Key differentiator: it enables live reload and stateful HMR for Rollup-built apps, using SystemJS for module loading. However, it has limited maintenance and lacks support for Rollup 3+.

npm install rollup-plugin-hot
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-HOT
R
rollup-plugin-hot
http-networkingjavascriptv0.1.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.

default (hmr function)
import hmr from 'rollup-plugin-hot'
const { hmr } = require('rollup-plugin-hot')
Package exports a single default function. CommonJS destructuring will return undefined.
Rollup config usage
import hmr from 'rollup-plugin-hot'; export default { plugins: [hmr({ enabled: true })] }
import { hot } from 'rollup-plugin-hot'
Named export does not exist.
TypeScript integration
// @ts-ignore import hmr from 'rollup-plugin-hot'
import hmr from 'rollup-plugin-hot'; // no types
Package lacks TypeScript definitions; use @ts-ignore or declare module.

Basic Rollup configuration with rollup-plugin-hot. Sets up HMR dev server on port 33440, watches for changes, and opens browser.

import hmr from 'rollup-plugin-hot'; export default { input: 'src/main.js', output: { dir: 'public', format: 'iife', sourcemap: true, }, plugins: [ hmr({ enabled: true, public: 'public', baseUrl: '/', port: 33440, open: 'default', openPage: '/', }), ], }; // Run rollup --watch to enable HMR
Debug
Known issues
gotchaOutput format is overridden to 'system' when HMR is running, regardless of what is set in config.
fix
Do not rely on output format during development; use format: 'iife' only for production builds without HMR.
affects: >=0.0.0
breakingPeer dependency rollup >=1.24.0 <3 – incompatible with Rollup 3+.
fix
Use Rollup 2.x or find alternative HMR plugin for Rollup 3+.
affects: >=0.1.0
gotchaThe plugin is a proof of concept and not production-ready; may exhibit unexpected behavior with other plugins.
fix
Test thoroughly before using in production; consider alternatives like @rollup/plugin-replace or webpack for stable HMR.
affects: >=0.0.0
deprecatedThe option 'randomPortFallback' defaults to true; may cause port conflicts if not set explicitly.
fix
Set randomPortFallback: false if you need a deterministic port.
affects: >=0.0.0
gotchaFiles without a URL (e.g., non-JS) are not handled by HMR and can cause errors.
fix
Ensure all HMR-accepting modules have proper URLs; rely on full-page reload for other files.
affects: >=0.1.1
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-hot'
Package not installed or incorrect import path.
fix
Run: npm install --save-dev rollup-plugin-hot
TypeError: hmr is not a function
Using destructured import with named export instead of default import.
fix
Change to: import hmr from 'rollup-plugin-hot'
Error: This plugin only works with rollup >=1.24.0 <3
Using incompatible Rollup version (3+).
fix
Downgrade Rollup to version 2.x.
Module format 'system' is not supported by Rollup for this output type.
HMR forces 'system' format, which may conflict with other output options like 'dir' or 'file'.
fix
Ensure output.dir or output.file is set; consider using single bundle output format.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Resources
rollup-plugin-hot — npm install rollup-plugin-hot · libregistry