mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
parent
5ad640b294
commit
0f85308191
@ -131,6 +131,7 @@ const defaultOptions = {
|
|||||||
},
|
},
|
||||||
render: {
|
render: {
|
||||||
ssr: {},
|
ssr: {},
|
||||||
|
resourceHints: true,
|
||||||
http2: {
|
http2: {
|
||||||
push: false
|
push: false
|
||||||
},
|
},
|
||||||
|
@ -328,8 +328,14 @@ export default class Renderer extends Tapable {
|
|||||||
if (this.options._routerBaseSpecified) {
|
if (this.options._routerBaseSpecified) {
|
||||||
HEAD += `<base href="${this.options.router.base}">`
|
HEAD += `<base href="${this.options.router.base}">`
|
||||||
}
|
}
|
||||||
const resourceHints = context.renderResourceHints()
|
|
||||||
HEAD += resourceHints + context.renderStyles()
|
let resourceHints = ''
|
||||||
|
if (this.options.render.resourceHints) {
|
||||||
|
resourceHints = context.renderResourceHints()
|
||||||
|
HEAD += resourceHints
|
||||||
|
}
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user