vue-cli-plugin-sitemap
vue-cli-plugin-sitemap copied to clipboard
Override created sitemap
Docs mention to run npm run sitemap
to inspect the output and this follows the config, but when the sitemap already exists is there a way to override it programmatically ? When I run the same command it doesn't seem to change the output rather ignores it.
My use case is that I need to generate/update this sitemap daily and need to override it.
Indeed, the file should be overridden. I haven't tested it but this line is probably the culprit: https://github.com/cheap-glitch/vue-cli-plugin-sitemap/blob/ad560f8d6ea4aaf7480443fecb744f80e6df9862/index.js#L89
As a workaround, maybe you could add a npm script that would run the following commands:
rm -f path/to/your/sitemap.xml && vue-cli-service sitemap
Thanks for responding to my issue! I'll keep an eye out for this fix, in the meantime I'll take your advice and remove it that way.