vite-plugin-sitemap-ts 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  A Vite plugin to generate `sitemap.xml`. Works in development mode by proxying middleware to `/sitemap.xml`.
4
4
 
5
- > [!WARNING]
6
- > **DO NOT USE IN PRODUCTION!** This plugin is actively being devloped.
5
+ > [!IMPORTANT]
6
+ > This plugin requires you to manually define `routes`. It does not automatically scan your build for routes!
7
7
 
8
8
  ## Installation
9
9
 
package/dist/index.cjs CHANGED
@@ -118,7 +118,7 @@ function sitemap(options) {
118
118
  let config;
119
119
  const enabled = options.enabled ?? true;
120
120
  const host = options.hostname ?? void 0;
121
- const routes = options.routes ?? ["/"];
121
+ const routes = options.routes?.length ? options.routes : ["/"];
122
122
  if (!host) {
123
123
  throw new Error("Sitemap hostname is not set and required to build the sitemap.");
124
124
  }
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ function sitemap(options) {
82
82
  let config;
83
83
  const enabled = options.enabled ?? true;
84
84
  const host = options.hostname ?? void 0;
85
- const routes = options.routes ?? ["/"];
85
+ const routes = options.routes?.length ? options.routes : ["/"];
86
86
  if (!host) {
87
87
  throw new Error("Sitemap hostname is not set and required to build the sitemap.");
88
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-sitemap-ts",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Vite plugin to generate sitemap.xml. Works in dev mode.",
5
5
  "author": "Cornelius Weidmann <cornelius@kyco.io> (https://kyco.io)",
6
6
  "license": "MIT",