mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-25 10:08:29 +00:00
performance.prefetch
This commit is contained in:
parent
90fc778e81
commit
effb354d71
@ -53,7 +53,8 @@ class Nuxt {
|
|||||||
performance: {
|
performance: {
|
||||||
gzip: {
|
gzip: {
|
||||||
threshold: 0
|
threshold: 0
|
||||||
}
|
},
|
||||||
|
prefetch: true
|
||||||
},
|
},
|
||||||
watchers: {
|
watchers: {
|
||||||
webpack: {},
|
webpack: {},
|
||||||
|
@ -95,7 +95,10 @@ export async function renderRoute (url, context = {}) {
|
|||||||
if (this._routerBaseSpecified) {
|
if (this._routerBaseSpecified) {
|
||||||
HEAD += `<base href="${this.options.router.base}">`
|
HEAD += `<base href="${this.options.router.base}">`
|
||||||
}
|
}
|
||||||
HEAD += context.renderResourceHints() + context.renderStyles()
|
if (this.options.performance.prefetch) {
|
||||||
|
HEAD += context.renderResourceHints()
|
||||||
|
}
|
||||||
|
HEAD += context.renderStyles()
|
||||||
APP += `<script type="text/javascript">window.__NUXT__=${serialize(context.nuxt, { isJSON: true })}</script>`
|
APP += `<script type="text/javascript">window.__NUXT__=${serialize(context.nuxt, { isJSON: true })}</script>`
|
||||||
APP += context.renderScripts()
|
APP += context.renderScripts()
|
||||||
const html = this.appTemplate({
|
const html = this.appTemplate({
|
||||||
|
Loading…
Reference in New Issue
Block a user