# Pagerless for Vite (React, Vue, Svelte)

> For single-page apps built with Vite. The key comes from VITE_PAGERLESS_KEY.

URL: https://pagerless.dev/integrations/vite
Updated: 2026-10-22

## Set up

```bash
npm i pagerless
```

```ts
import { init } from "pagerless/browser";

init({ key: import.meta.env.VITE_PAGERLESS_KEY, service: "web" });
```

## What it catches

- Uncaught errors and unhandled rejections in the page, grouped by path.
- Failing fetch calls (5xx, 429, network) from pagerless 0.2.0.
- Sent when the tab is hidden.

## Questions

### Is it safe to ship the key?

Yes. Ingest keys can only send events. Use a separate key for the browser so you can revoke it alone.
