mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 09:22:27 +00:00
test: spa meta preload files
This commit is contained in:
parent
4907e81574
commit
f15eb9efa7
@ -62,7 +62,7 @@ module.exports = async function nuxtMiddleware(req, res, next) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Pass with single Link header
|
// 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
|
// https://www.w3.org/Protocols/9707-link-header.html
|
||||||
res.setHeader('Link', pushAssets.join(','))
|
res.setHeader('Link', pushAssets.join(','))
|
||||||
}
|
}
|
||||||
|
5
test/fixtures/spa/nuxt.config.js
vendored
5
test/fixtures/spa/nuxt.config.js
vendored
@ -2,6 +2,11 @@ module.exports = {
|
|||||||
mode: 'spa',
|
mode: 'spa',
|
||||||
dev: false,
|
dev: false,
|
||||||
transition: false,
|
transition: false,
|
||||||
|
render: {
|
||||||
|
http2: {
|
||||||
|
push: true
|
||||||
|
}
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
stats: false
|
stats: false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user