-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
It would be nice if this library exported a function to build the string in the sitemap file, instead of directly performing the side effect of writing to a file.
Use case: I want to dynamically return the sitemap from an endpoint instead of writing the file at build time. This would let me keep the sitemap up to date when new routes are added e.g. from a CMS, without rebuilding and redeploying.
Separating the string generation and writing to file is generally a good idea and means the string generation could be composed with other use cases - not just mine - as well.
Perhaps exporting a function like this is out of scope for a Vite plugin, however? I understand that a Vite plugin is really only expected to perform file transformations.
Metadata
Metadata
Assignees
Labels
No labels