Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Oct 9, 2019
1 parent a42ccf8 commit 7882f83
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Expand Up @@ -24,10 +24,10 @@ yarn add --dev @nuxtjs/router # or npm install --save-dev @nuxtjs/router

2. Add `@nuxtjs/router` to the `buildModules` section of `nuxt.config.js`

:warning: If you are using Nuxt `< 2.9.0`, use `modules` instead.
:warning: If you are using Nuxt older than **v2.9** you have to install module as a `dependency` (No `--dev` or `--save-dev` flags) and also use `modules` section in `nuxt.config.js` instead of `buildModules`.

```js
{
export default {
buildModules: [
// Simple usage
'@nuxtjs/router',
Expand All @@ -41,7 +41,7 @@ yarn add --dev @nuxtjs/router # or npm install --save-dev @nuxtjs/router
### Using top level options

```js
{
export default {
buildModules: [
'@nuxtjs/router'
],
Expand All @@ -54,7 +54,7 @@ yarn add --dev @nuxtjs/router # or npm install --save-dev @nuxtjs/router
If you are using SPA mode, add an index `/` route to `generate` section of `nuxt.config.js`:

```js
{
export default {
generate: {
routes: [
'/'
Expand All @@ -67,18 +67,21 @@ If you are using SPA mode, add an index `/` route to `generate` section of `nuxt

### `path`

- Type: `String`
- Default: `srcDir`

Location of you route file.

### `fileName`

- Type: `String`
- Default: `router.js`

Name of you route file.

### `keepDefaultRouter`

- Type: `Boolean`
- Default: `false`

Can access the default router.
Expand Down

0 comments on commit 7882f83

Please sign in to comment.