Skip to content

Commit

Permalink
fix: ensure hook sitemap:generate is called
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Dec 26, 2022
1 parent 79807da commit 0dbb235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ declare module 'nitropack' {

const sitemapContext = { stream, urls }
// @ts-expect-error untyped
await nuxt.hooks.hook('sitemap:generate', sitemapContext)
await nuxt.hooks.callHook('sitemap:generate', sitemapContext)
// Return a promise that resolves with your XML string
const sitemapXml = await streamToPromise(Readable.from(sitemapContext.urls).pipe(sitemapContext.stream))
.then(data => data.toString())
Expand Down

0 comments on commit 0dbb235

Please sign in to comment.