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 +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
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
|
-
> [!
|
|
6
|
-
>
|
|
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