Skip to content

Commit f11ebba

Browse files
authored
Merge pull request #5 from mornir/source
Add instruction for Nuxt > v2.4.0
2 parents 6678fcd + ce5364d commit f11ebba

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

content/nuxt.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ At this stage, when you run `npm run dev` inside of the `guess-nuxt` directory a
112112

113113
Now let us introduce the `GuessPlugin` plugin to the webpack configuration of our Nuxt.js application!
114114

115-
Create a file called `nuxt.config.js` in `guess-nuxt` with the following content:
115+
Create a file called `nuxt.config.js` in `guess-nuxt` with the content below. In [Nuxt 2.4.0](https://nuxtjs.org/guide/release-notes#smart-prefetching-), pages are automatically prefetched using [quicklink](https://github.com/GoogleChromeLabs/quicklink). To use Guess.js instead, you need to disable that feature by setting `router.prefetchLinks` to `false`.
116116

117117
```javascript
118118
import { readFileSync } from 'fs'
@@ -131,6 +131,10 @@ export default {
131131
)
132132
}
133133
}
134+
},
135+
// Nuxt > v2.4.0
136+
router: {
137+
prefetchLinks: false
134138
}
135139
}
136140
```
@@ -193,12 +197,13 @@ export default {
193197
}
194198
```
195199

196-
Alternative for alternatively, a [@nuxtjs/guess](https://github.com/daliborgogic/guess-module) module for Guess.js!
200+
Alternatively, there is a [@nuxtjs/guess](https://github.com/daliborgogic/guess-module) module for Guess.js!
197201

198202
### Setup
199203

200204
- Add `@nuxtjs/guess` dependency to your project
201205
- Add `@nuxtjs/guess` to modules section of `nuxt.config.js`
206+
- If using Nuxt > 2.4.0, set `router.prefetchLinks` to `false` in `nuxt.config.js`
202207

203208
```json
204209
{

0 commit comments

Comments
 (0)