Skip to content

Commit

Permalink
fix: nuxi prepare error
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 21, 2023
1 parent 2384279 commit 5cbd1d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ export {}
references.push({ path: resolve(nuxt.options.buildDir, 'nuxt-simple-sitemap.d.ts') })
})

// don't run with `nuxi prepare`
if (nuxt.options._prepare)
return

const fixSlashes = (url: string) => nuxt.options.sitemap?.trailingSlash ? withTrailingSlash(url) : withoutTrailingSlash(url)

const prerendedRoutes: SitemapItemLoose[] = []
Expand Down

0 comments on commit 5cbd1d4

Please sign in to comment.