diff --git a/lib/nuxt.js b/lib/nuxt.js index 5053327f0b..cbe91a83a4 100644 --- a/lib/nuxt.js +++ b/lib/nuxt.js @@ -53,7 +53,8 @@ class Nuxt { performance: { gzip: { threshold: 0 - } + }, + prefetch: true }, watchers: { webpack: {}, diff --git a/lib/render.js b/lib/render.js index 467ec9099c..9199c9153a 100644 --- a/lib/render.js +++ b/lib/render.js @@ -95,7 +95,10 @@ export async function renderRoute (url, context = {}) { if (this._routerBaseSpecified) { HEAD += `` } - HEAD += context.renderResourceHints() + context.renderStyles() + if (this.options.performance.prefetch) { + HEAD += context.renderResourceHints() + } + HEAD += context.renderStyles() APP += `` APP += context.renderScripts() const html = this.appTemplate({