Skip to content

Fix openapi-fetch size #1250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/content/docs/openapi-fetch/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ client.GET("/some-authenticated-url", {

## Caching

openapi-fetch doesn’t provide any caching utilities (it’s 1 kb, remember?). But this library is so lightweight, caching can be added easily.
openapi-fetch doesn’t provide any caching utilities. But this library is so lightweight, caching can be added easily.

### Built-in Fetch caching

Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/openapi-fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ description: Get Started with openapi-fetch

<img src="/assets/openapi-fetch.svg" alt="openapi-fetch" width="216" height="40" />

openapi-fetch applies your OpenAPI types to the native fetch API via TypeScript. Weighs in at **2 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
openapi-fetch applies your OpenAPI types to the native fetch API via TypeScript. Weighs **2 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.

| Library | Size (min) |
| :----------------------------- | ---------: |
| **openapi-fetch** | `2 kB` |
| **openapi-typescript-fetch** | `4 kB` |
| **openapi-typescript-codegen** | `345 kB` |

The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 1 kb package.
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 2 kb package.

```ts
import createClient from "openapi-fetch";
Expand Down
4 changes: 2 additions & 2 deletions packages/openapi-fetch/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<img src="../../docs/public/assets/openapi-fetch.svg" alt="openapi-fetch" width="216" height="40" />

openapi-fetch applies your OpenAPI types to the native fetch API via TypeScript. Weighs in at **2 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
openapi-fetch applies your OpenAPI types to the native fetch API via TypeScript. Weighs **2 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.

| Library | Size (min) |
| :----------------------------- | ---------: |
| **openapi-fetch** | `2 kB` |
| **openapi-typescript-fetch** | `4 kB` |
| **openapi-typescript-codegen** | `345 kB` |

The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 1 kb package.
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 2 kb package.

```ts
import createClient from "openapi-fetch";
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openapi-fetch",
"description": "Fetch using your OpenAPI types. Weighs in at 1 kb and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.",
"description": "Fetch using your OpenAPI types. Weighs 2 kb and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.",
"version": "0.7.0",
"author": {
"name": "Drew Powers",
Expand Down