vite-plugin-sitemap 0.1.3 → 0.1.4
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 +17 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -77,6 +77,23 @@ export default {
|
|
|
77
77
|
|
|
78
78
|
You can find a working example in example folder.
|
|
79
79
|
|
|
80
|
+
### exclude
|
|
81
|
+
|
|
82
|
+
- **Type:** `string[]`
|
|
83
|
+
- **Default:** `[]`
|
|
84
|
+
|
|
85
|
+
Array of strings with excluded routes.
|
|
86
|
+
```js
|
|
87
|
+
export default {
|
|
88
|
+
plugins: [
|
|
89
|
+
Vue(),
|
|
90
|
+
Sitemap({ exclude: ['/admin', '/private'] }),
|
|
91
|
+
],
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
You can find a working example in example folder.
|
|
96
|
+
|
|
80
97
|
### outDir
|
|
81
98
|
|
|
82
99
|
- **Type:** `string`
|
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(src_exports);
|
|
45
45
|
|
|
46
|
-
// node_modules/.pnpm/sitemap-ts@0.1.
|
|
46
|
+
// node_modules/.pnpm/sitemap-ts@0.1.6/node_modules/sitemap-ts/dist/index.mjs
|
|
47
47
|
var import_fs = __toESM(require("fs"), 1);
|
|
48
48
|
var import_stream = __toESM(require("stream"), 1);
|
|
49
49
|
var import_readline = __toESM(require("readline"), 1);
|
|
@@ -3543,6 +3543,7 @@ function resolveOptions(userOptions) {
|
|
|
3543
3543
|
return Object.assign({
|
|
3544
3544
|
hostname: "http://localhost/",
|
|
3545
3545
|
dynamicRoutes: [],
|
|
3546
|
+
exclude: [],
|
|
3546
3547
|
outDir: "dist",
|
|
3547
3548
|
changefreq: "daily",
|
|
3548
3549
|
priority: 1,
|
|
@@ -8318,7 +8319,7 @@ function getRoutes(options) {
|
|
|
8318
8319
|
return slash$1((0, import_path.join)("/", parsedRoute.dir, parsedRoute.name));
|
|
8319
8320
|
}),
|
|
8320
8321
|
...options.dynamicRoutes.map((route) => slash$1((0, import_path.join)("/", (0, import_path.join)((0, import_path.parse)(route).dir, (0, import_path.parse)(route).name))))
|
|
8321
|
-
];
|
|
8322
|
+
].filter((route) => !options.exclude.includes(route));
|
|
8322
8323
|
}
|
|
8323
8324
|
function getFormattedSitemap(options, routes) {
|
|
8324
8325
|
return routes.map((route) => ({
|