Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce5364d

Browse files
authored
Add instruction for Nuxt > v2.4.0
Source: nuxt/nuxt#4574 (comment)
1 parent 6678fcd commit ce5364d

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)

AltStyle によって変換されたページ (->オリジナル) /