test: spa meta preload files

This commit is contained in:
Clark Du 2018-01-29 11:59:05 +08:00
parent 4907e81574
commit f15eb9efa7
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
2 changed files with 6 additions and 1 deletions

View File

@ -62,7 +62,7 @@ module.exports = async function nuxtMiddleware(req, res, next) {
})
// Pass with single Link header
// https://preloadFilesblog.cloudflare.com/http-2-server-push-with-multiple-assets-per-link-header
// https://blog.cloudflare.com/http-2-server-push-with-multiple-assets-per-link-header
// https://www.w3.org/Protocols/9707-link-header.html
res.setHeader('Link', pushAssets.join(','))
}

View File

@ -2,6 +2,11 @@ module.exports = {
mode: 'spa',
dev: false,
transition: false,
render: {
http2: {
push: true
}
},
build: {
stats: false
}