Skip to content

Commit

Permalink
fix: experimentalWarmUp hitting wrong sitemap paths
Browse files Browse the repository at this point in the history
Fixes #356
  • Loading branch information
harlan-zw committed Sep 3, 2024
1 parent 6816194 commit 7951fab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default defineNuxtConfig({
{ label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' },
{ label: 'Hreflangs', select: 'count(xhtml:link)', width: '25%' },
],
experimentalWarmUp: true,
urls: [
'/manual-url-test',
],
Expand Down
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ declare module 'vue-router' {
sitemaps[sitemapName as keyof typeof sitemaps] = defu(
{
sitemapName,
_route: withBase(`sitemap/${sitemapName}.xml`, nuxt.options.app.baseURL || '/'),
_route: withBase(joinURL(config.sitemapsPathPrefix, `${sitemapName}.xml`), nuxt.options.app.baseURL || '/'),
_hasSourceChunk: typeof definition.urls !== 'undefined' || definition.sources?.length || !!definition.dynamicUrlsApiEndpoint,
},
{ ...definition, urls: undefined, sources: undefined },
Expand Down

0 comments on commit 7951fab

Please sign in to comment.