# @prefresh/web-dev-server

> A web-dev-server plugin to enable fast-refresh for Preact components.

Latest version **1.1.8** (published 2026-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @prefresh/web-dev-server
pnpm add @prefresh/web-dev-server
yarn add @prefresh/web-dev-server
bun add @prefresh/web-dev-server
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.1.8 |
| Published | 2026-09-13 |
| First published | 2020-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 390 |
| Maintainers | jdecroock, marvinhagemeister, developit |

## Links

- npm: https://www.npmjs.com/package/@prefresh/web-dev-server
- 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/web-dev-server

## Dependencies (4)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.22.1
- [@prefresh/core](https://npm.io/package/@prefresh/core.md) 1.5.11
- [@prefresh/utils](https://npm.io/package/@prefresh/utils.md) 1.2.1
- [@prefresh/babel-plugin](https://npm.io/package/@prefresh/babel-plugin.md) 0.5.4

## Recent versions

- 1.1.8 (latest) — 2026-09-13
- 1.1.7 — 2026-08-27
- 1.1.6 — 2026-02-18
- 1.1.5 — 2025-08-20
- 1.1.4 — 2025-08-19
- 1.1.3 — 2025-06-28
- 1.1.2 — 2023-11-10
- 1.1.1 — 2023-06-26
- 1.1.0 — 2023-05-09
- 1.0.5 — 2022-10-21
- 1.0.4 — 2022-02-20
- 1.0.3 — 2022-02-20
- 1.0.2 — 2021-03-17
- 1.0.1 — 2021-01-22
- 1.0.0 — 2020-12-17
- … 2 more at https://npm.io/package/@prefresh/web-dev-server/versions

## README

# Prefresh-web-dev-server

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

## Setup

```
npm i --save-dev @prefresh/web-dev-server
## OR
yarn add --dev @prefresh/web-dev-server
```

web-dev-server.config.mjs

```js
export default {
  plugins: ['@prefresh/web-dev-server'],
};
```

## Best practices

### Recognition

We need to be able to recognise your components, this means that components should
start with a capital letter and hook should start with `use` followed by a capital letter.
This allows the Babel plugin to effectively recognise these.

Do note that a component as seen below is not named.

```jsx
export default () => {
  return <p>Want to refresh</p>;
};
```

Instead do:

```jsx
const Refresh = () => {
  return <p>Want to refresh</p>;
};

export default Refresh;
```

When you are working with HOC's be sure to lift up the `displayName` so we can
recognise it as a component.

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