Skip to content

Commit ed74912

Browse files
authored
doc: add Nuxt 3 example
1 parent 7c5adf6 commit ed74912

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,23 @@
88
[![Standard JS][standard-js-src]][standard-js-href]
99

1010
> Nuxt 2 module to dynamically redirect initial requests
11-
11+
1212
[📖 **Release Notes**](./CHANGELOG.md)
1313

14+
15+
## Nuxt 3
16+
17+
In Nuxt 3 redirects are supported out of the box through route rules, this module is not needed.
18+
19+
```ts
20+
export default defineNuxtConfig({
21+
routeRules: {
22+
// Redirects legacy urls
23+
'/old-page': { redirect: '/new-page' }
24+
}
25+
})
26+
```
27+
1428
## Features
1529

1630
Redirecting URLs is an often discussed topic, especially when it comes to

0 commit comments

Comments
 (0)