nuxt-modules/robots

fix: route is prerendered even for ssr build

dargmuesli opened this issue ยท 2 comments

Currently a built nuxt page using this module has its robots.txt prerendered. That means that e.g. a Sitemap: (req) => ...req.headers.host... function has its host set to localhost at build time and does not allow dynamic content at deployment.

In PR #75 I changed that behavior to only prerender the route for target: static. I added tests to ensure no unwanted regressions.

๐Ÿ‘
Bumping the issue - facing this problem as well. Running SSR Nuxt 3 and build command prerenders robots.txt, resulting in in correct Sitemap behaviour

Just add a ๐Ÿ‘ to the first post to show your support! ๐Ÿ‘