Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Feb 12, 2025
1 parent bc640db commit 787cd02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/unenv-preset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

[unenv](https://github.com/unjs/unenv) preset for cloudflare.

unenv provides polyfills to add [Node.js](https://nodejs.org/) compatibility for any JavaScript runtime, including browsers and edge workers.

## Usage

```ts
import { cloudflare } from "@cloudflare/unenv-preset";
import { defineEnv } from "unenv";

const { env } = defineEnv({
nodeCompat: true,
presets: [cloudflare],
});

const { alias, inject, external, polyfill } = env;
```

See the unenv [README](https://github.com/unjs/unenv/blob/main/README.md) for more details.

0 comments on commit 787cd02

Please sign in to comment.