mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): ensure we add prerender hints to correct event (#23799)
This commit is contained in:
parent
5a6dfd8847
commit
8c9333a41c
@ -114,7 +114,7 @@ export default defineComponent({
|
||||
|
||||
if (import.meta.server && import.meta.prerender) {
|
||||
// Hint to Nitro to prerender the island component
|
||||
appendResponseHeader(event, 'x-nitro-prerender', url)
|
||||
nuxtApp.runWithContext(() => prerenderRoutes(url))
|
||||
}
|
||||
// TODO: Validate response
|
||||
// $fetch handles the app.baseURL in dev
|
||||
@ -127,7 +127,7 @@ export default defineComponent({
|
||||
if (import.meta.server && import.meta.prerender) {
|
||||
const hints = r.headers.get('x-nitro-prerender')
|
||||
if (hints) {
|
||||
prerenderRoutes(hints)
|
||||
appendResponseHeader(event, 'x-nitro-prerender', hints)
|
||||
}
|
||||
}
|
||||
setPayload(key, result)
|
||||
|
@ -12,10 +12,8 @@ export default defineUntypedSchema({
|
||||
* Value should be either a string or array of strings pointing to source directories or config path relative to current config.
|
||||
*
|
||||
* You can use `github:`, `gh:` `gitlab:` or `bitbucket:`.
|
||||
*
|
||||
* @see https://github.com/unjs/c12#extending-config-layer-from-remote-sources
|
||||
* @see https://github.com/unjs/giget
|
||||
*
|
||||
* @type {(string|string|[string, typeof import('c12').SourceOptions?])[]}
|
||||
*/
|
||||
extends: null,
|
||||
|
Loading…
Reference in New Issue
Block a user