A Rollup/Nollup development plugin enabling React Fast Refresh (Hot Module Replacement) for React applications. Current stable version is 0.0.3, with no recent updates. It wraps react-refresh and requires the Babel plugin react-refresh/babel. Key differentiator: lightweight, zero-config HMR for Rollup-based React builds. Less maintenance compared to alternatives like @pmmmwh/react-refresh-webpack-plugin (webpack-only).
npm install rollup-plugin-react-refreshNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Rollup config with react-refresh plugin enabled only in development.
Add 'react-refresh/babel' to Babel plugins in development environment.
Wrap plugin with process.env.NODE_ENV === 'development' condition.
Use `const refresh = require('rollup-plugin-react-refresh').default;`Install exactly react-refresh@^0.9.0 for guaranteed compatibility.
Replace `require('rollup-plugin-react-refresh')` with `require('rollup-plugin-react-refresh').default`.Run `npm install react-refresh@^0.9.0 --save-dev`.
Add `import React from 'react';` to all JSX files.