mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
performance.prefetch
This commit is contained in:
parent
90fc778e81
commit
effb354d71
@ -53,7 +53,8 @@ class Nuxt {
|
||||
performance: {
|
||||
gzip: {
|
||||
threshold: 0
|
||||
}
|
||||
},
|
||||
prefetch: true
|
||||
},
|
||||
watchers: {
|
||||
webpack: {},
|
||||
|
@ -95,7 +95,10 @@ export async function renderRoute (url, context = {}) {
|
||||
if (this._routerBaseSpecified) {
|
||||
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 += context.renderScripts()
|
||||
const html = this.appTemplate({
|
||||
|
Loading…
Reference in New Issue
Block a user