Guess.js integration for Nuxt.js with guess-webpack
- Add
@nuxtjs/guessdependency using yarn or npm to your project - Add
@nuxtjs/guessto modules section ofnuxt.config.js - If using Nuxt > 2.4.0, set
router.prefetchLinkstofalseinnuxt.config.js
export default {
modules: [
[ '@nuxtjs/guess', { GA: 'XXXXXXX' }]
],
// Nuxt > 2.4.0
router: {
prefetchLinks: false
}
}Options given directly to guess-webpack options.
Nothing more to do, @nuxtjs/guess will automagically prefetch the routes depending of your Google Analytics stats 😎