Skip to content
Open
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
8 changes: 4 additions & 4 deletions docs/1.docs/5.routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ You can set route rules in the `nitro.routeRules` options.
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitro/config";

export default defineConfig({
export default defineNitroConfig({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is defineConfig from nitro

routeRules: {
'/blog/**': { swr: true },
'/blog/**': { swr: 600 },
'/blog/**': { static: true },
'/blog/**': { cache: { /* cache options*/ } },
'/blog2/**': { swr: 600 },
'/blog3/**': { static: true },
'/blog4/**': { cache: { /* cache options*/ } },
'/assets/**': { headers: { 'cache-control': 's-maxage=0' } },
'/api/v1/**': { cors: true, headers: { 'access-control-allow-methods': 'GET' } },
'/old-page': { redirect: '/new-page' },
Expand Down
4 changes: 3 additions & 1 deletion docs/2.deploy/20.providers/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ The `exports.cloudflare.ts` file must not have a default export.
You can also customize the entrypoint file location using the `cloudflare.exports` option in your `nitro.config.ts`:

```ts [nitro.config.ts]
export default defineConfig({
import { defineNitroConfig } from "nitro/config";

export default defineNitroConfig({
cloudflare: {
exports: "custom-exports-entry.ts"
}
Expand Down
Loading