Vite plugin for Redux Hot Module Replacement (HMR) during development. Current version 1.0.1, released February 2025 (single release). It eliminates full-page reloads when Redux reducers change, preserving store state. Requires a specific file structure: reducers must be default-exported from a separate file, and the store index file must import it. Configures store index and reducers file paths, optional store variable name and reducer wrapping function. Only works in Vite dev mode; no circular dependencies between files or Vite falls back to full reload. TypeScript types included. Lightweight alternative to manual HMR setup with webpack-hot-middleware or custom solutions. Minimal dependencies (only Vite as peer dependency).
npm install vite-plugin-redux-hmrNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal setup: install plugin, configure in vite.config.ts, define reducers as default exports, and use Redux with HMR in development.
Refactor your module graph to avoid circular imports.
Ensure paths are relative to project root (not src alone) and files exist.
export const store = configureStore(...) => storeVariableName: 'store'.
Set wrapReducersFunction to a function that wraps reducers, e.g., '(reducers) => rememberReducer(reducers)'.
export default combineReducers({ ... });Use import reduxHmr from 'vite-plugin-redux-hmr' (ESM only).
Refactor to remove circular imports.