# @universal-deploy/node

> Wraps `@universal-deploy/store` entries with [srvx](https://srvx.h3.dev/).

Latest version **0.1.11** (published 2026-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @universal-deploy/node
pnpm add @universal-deploy/node
yarn add @universal-deploy/node
bun add @universal-deploy/node
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 0.1.11 |
| Published | 2026-09-21 |
| First published | 2026-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | brillout, magne4000, nitedani |

## Links

- npm: https://www.npmjs.com/package/@universal-deploy/node
- Repository: https://github.com/photon-js/universal-deploy
- Homepage: https://github.com/photon-js/universal-deploy#readme
- Issues: https://github.com/photon-js/universal-deploy/issues
- npm.io page: https://npm.io/package/@universal-deploy/node

## Recent versions

- 0.1.11 (latest) — 2026-09-21
- 0.1.10 — 2026-08-05
- 0.1.9 — 2026-07-22
- 0.1.8 — 2026-07-06
- 0.1.7 — 2026-05-21
- 0.1.6 — 2026-04-17
- 0.1.5 — 2026-04-08
- 0.1.4 — 2026-04-01
- 0.1.3 — 2026-03-11
- 0.1.2 — 2026-03-09
- 0.1.1 — 2026-02-25
- 0.1.0 — 2026-02-17
- 0.0.3 — 2026-02-04
- 0.0.2 — 2026-02-03
- 0.0.1 — 2026-01-21

## README

Wraps `@universal-deploy/store` entries with [srvx](https://srvx.h3.dev/).

## `precompress`

Off by default. Emits `.br`/`.gz` beside eligible static assets at build time and serves those
files instead of compressing on every request.

```ts
import { node } from "@universal-deploy/node/vite";

node({ precompress: true })
// or, with the defaults spelled out:
node({
  precompress: {
    encodings: ["br", "gzip"], // the first one the client accepts wins
    threshold: 1024, // minimum size of the original file, in bytes
  },
})
```

Eligible: `.css`, `.htm`, `.html`, `.js`, `.json`, `.mjs`, `.svg`, `.txt`, `.wasm` and `.xml`, at
or above `threshold`, when the encoded form is no larger. Everything else is left to srvx's own
static handling, as before.

Variants track their sources: a file that earns one has it, a file that no longer does has it
removed, and a removal that fails stops the build. Files in `publicDir` are copied as-is: the build creates no
`.br`/`.gz` for them and deletes none. A variant you ship beside one is still served — keeping it
in step with its source is yours.

Not covered: a runtime `static` pointing anywhere other than the directory this build
precompressed, and a client built separately without `precompress` — both fall back to srvx's
own static handling; and pages written by a pre-render step that runs no Vite build.
Variants left behind by a removed encoding are never looked up.

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