You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/nuxt.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ At this stage, when you run `npm run dev` inside of the `guess-nuxt` directory a
112
112
113
113
Now let us introduce the `GuessPlugin` plugin to the webpack configuration of our Nuxt.js application!
114
114
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`.
116
116
117
117
```javascript
118
118
import { readFileSync } from'fs'
@@ -131,6 +131,10 @@ export default {
131
131
)
132
132
}
133
133
}
134
+
},
135
+
// Nuxt > v2.4.0
136
+
router: {
137
+
prefetchLinks:false
134
138
}
135
139
}
136
140
```
@@ -193,12 +197,13 @@ export default {
193
197
}
194
198
```
195
199
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!
197
201
198
202
### Setup
199
203
200
204
- Add `@nuxtjs/guess` dependency to your project
201
205
- 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`
0 commit comments