just run yarn dev and access /sitemap.xml on the codesandbox repo.
What is expected ?
The sitemap should be displayed in XML format
What is actually happening?
A Nuxt error shows up : "invalid URL : /static/_nuxt"
Additional comments?
Linked to this issue : https://github.com/nuxt-community/sitemap-module/issues/60
A solution has been provided in this issue : explicitely set "hostname" in sitemap config.
However, it is not possible in my case, as my project will be hosted on several environments, and hostname won't be the same for each environment. I would have to access the current hostname in "nuxt.config.js" but I don't think this is possible.
This bug report is available on Nuxt community (#c141)
Version
2.4.0
Reproduction link
https://codesandbox.io/s/gallant-pascal-dox5n?file=/nuxt.config.js
Steps to reproduce
just run
yarn dev
and access/sitemap.xml
on the codesandbox repo.What is expected ?
The sitemap should be displayed in XML format
What is actually happening?
A Nuxt error shows up : "invalid URL : /static/_nuxt"
Additional comments?
Linked to this issue : https://github.com/nuxt-community/sitemap-module/issues/60 A solution has been provided in this issue : explicitely set "hostname" in sitemap config. However, it is not possible in my case, as my project will be hosted on several environments, and hostname won't be the same for each environment. I would have to access the current hostname in "nuxt.config.js" but I don't think this is possible.