# @prefresh/babel-plugin

> A babel-plugin to enable fast-refresh for Preact components.

Latest version **0.5.3** (published 2026-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @prefresh/babel-plugin
pnpm add @prefresh/babel-plugin
yarn add @prefresh/babel-plugin
bun add @prefresh/babel-plugin
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.3 |
| Published | 2026-02-18 |
| First published | 2020-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 390 |
| Maintainers | jdecroock, marvinhagemeister, developit |

## Links

- npm: https://www.npmjs.com/package/@prefresh/babel-plugin
- Repository: https://github.com/preactjs/prefresh
- Homepage: https://github.com/preactjs/prefresh#readme
- Issues: https://github.com/preactjs/prefresh/issues
- npm.io page: https://npm.io/package/@prefresh/babel-plugin

## Recent versions

- 0.5.3 (latest) — 2026-02-18
- 0.5.2 — 2025-06-28
- 0.5.1 — 2023-11-10
- 0.5.0 — 2023-05-09
- 0.4.4 — 2022-10-21
- 0.4.3 — 2022-02-20
- 0.4.2 — 2022-02-20
- 0.4.1 — 2021-03-17
- 0.4.0 — 2020-12-17
- 0.3.0 — 2020-12-11
- 0.2.2 — 2020-09-29
- 0.2.1 — 2020-09-29
- 0.2.0 — 2020-09-25
- 0.1.0 — 2020-09-17

## README

# Prefresh-babel

[![npm version](https://badgen.net/npm/v/@prefresh/babel-plugin)](https://www.npmjs.com/package/@prefresh/babel-plugin)

This is a forked equivalent of [the react-refresh babel plugin](https://github.com/facebook/react/blob/master/packages/react-refresh/src/ReactFreshBabelPlugin.js)
difference being that we need a way to memoize createContext between HMR.

For the SWC version of this plugin refer to https://www.npmjs.com/package/@swc/plugin-prefresh

---
_Source: https://npm.io/package/@prefresh/babel-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
