Skip to content

Commit

Permalink
docs: fix request base url env (#6679)
Browse files Browse the repository at this point in the history
  • Loading branch information
luhc228 authored Dec 5, 2023
1 parent 4e5de5f commit 0626b3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions website/docs/guide/advanced/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,11 @@ export const requestConfig = defineRequestConfig({

```shell title=".env.local"
# The should not be committed.
BASEURL=http://localhost:9999/api
ICE_BASE_URL=http://localhost:9999/api
```

```shell title=".env.prod"
BASEURL=https://example.com/api
```shell title=".env.production"
ICE_BASE_URL=https://example.com/api
```

`src/app.tsx` 中配置 `request.baseURL`:
Expand All @@ -522,6 +522,6 @@ BASEURL=https://example.com/api
import { defineRequestConfig } from '@ice/plugin-request/types';

export const requestConfig = defineRequestConfig({
baseURL: process.env.BASEURL,
baseURL: process.env.ICE_BASE_URL,
});
```

0 comments on commit 0626b3e

Please sign in to comment.