mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
parent
5ad640b294
commit
0f85308191
@ -131,6 +131,7 @@ const defaultOptions = {
|
||||
},
|
||||
render: {
|
||||
ssr: {},
|
||||
resourceHints: true,
|
||||
http2: {
|
||||
push: false
|
||||
},
|
||||
|
@ -328,8 +328,14 @@ export default class Renderer extends Tapable {
|
||||
if (this.options._routerBaseSpecified) {
|
||||
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 += context.renderScripts()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user