From 6dac719f06bfdea04d7a87c9bcd1bbbc41d8791f Mon Sep 17 00:00:00 2001 From: WonhyeokJung Date: Thu, 13 Oct 2022 14:42:23 +0900 Subject: [PATCH] docs:replace routerOptions to routerConfig --- .../content/2.guide/2.directory-structure/1.pages.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/2.guide/2.directory-structure/1.pages.md b/docs/content/2.guide/2.directory-structure/1.pages.md index 5be92592029..f05e4db7cfd 100644 --- a/docs/content/2.guide/2.directory-structure/1.pages.md +++ b/docs/content/2.guide/2.directory-structure/1.pages.md @@ -335,10 +335,10 @@ It is possible to customize [vue-router options](https://router.vuejs.org/api/in This is the recommended way to specify router options. ```js [app/router.options.ts] -import type { RouterOptions } from '@nuxt/schema' +import type { RouterConfig } from '@nuxt/schema' // https://router.vuejs.org/api/interfaces/routeroptions.html -export default { +export default { } ``` @@ -348,10 +348,10 @@ You can optionally override routes using a function that accepts scanned routes If returning `null` or `undefined`, Nuxt will fallback to the default routes. (useful to modify input array) ```js [app/router.options.ts] -import type { RouterOptions } from '@nuxt/schema' +import type { RouterConfig } from '@nuxt/schema' // https://router.vuejs.org/api/interfaces/routeroptions.html -export default { +export default { routes: (_routes) => [ { name: 'home', @@ -368,11 +368,11 @@ You can optionally override history mode using a function that accepts base url If returning `null` or `undefined`, Nuxt will fallback to the default history. ```js [app/router.options.ts] -import type { RouterOptions } from '@nuxt/schema' +import type { RouterConfig } from '@nuxt/schema' import { createMemoryHistory } from 'vue-router' // https://router.vuejs.org/api/interfaces/routeroptions.html -export default { +export default { history: base => process.client ? createMemoryHistory(base) : null /* default */ } ```