vite-plugin-sitemap 0.6.1 → 0.6.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/dist/index.js +2 -4
- package/dist/index.mjs +2 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11107,11 +11107,9 @@ function getFormattedSitemap(options, routes) {
|
|
|
11107
11107
|
if (options.i18n) {
|
|
11108
11108
|
const languages = options.i18n.languages.map((str) => ({
|
|
11109
11109
|
lang: str,
|
|
11110
|
-
url: str === options.i18n?.defaultLanguage ? url : `${url}
|
|
11110
|
+
url: str === options.i18n?.defaultLanguage ? url : `${removeMaybeSuffix("/", url)}${ensurePrefix("/", str)}`
|
|
11111
11111
|
}));
|
|
11112
|
-
return Object.assign(formattedSitemap, {
|
|
11113
|
-
links: options.i18n.defaultLanguage ? [...languages, { lang: "x-default", url }] : languages
|
|
11114
|
-
});
|
|
11112
|
+
return Object.assign(formattedSitemap, { links: options.i18n.defaultLanguage ? [...languages, { lang: "x-default", url }] : languages });
|
|
11115
11113
|
}
|
|
11116
11114
|
return formattedSitemap;
|
|
11117
11115
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -11107,11 +11107,9 @@ function getFormattedSitemap(options, routes) {
|
|
|
11107
11107
|
if (options.i18n) {
|
|
11108
11108
|
const languages = options.i18n.languages.map((str) => ({
|
|
11109
11109
|
lang: str,
|
|
11110
|
-
url: str === options.i18n?.defaultLanguage ? url : `${url}
|
|
11110
|
+
url: str === options.i18n?.defaultLanguage ? url : `${removeMaybeSuffix("/", url)}${ensurePrefix("/", str)}`
|
|
11111
11111
|
}));
|
|
11112
|
-
return Object.assign(formattedSitemap, {
|
|
11113
|
-
links: options.i18n.defaultLanguage ? [...languages, { lang: "x-default", url }] : languages
|
|
11114
|
-
});
|
|
11112
|
+
return Object.assign(formattedSitemap, { links: options.i18n.defaultLanguage ? [...languages, { lang: "x-default", url }] : languages });
|
|
11115
11113
|
}
|
|
11116
11114
|
return formattedSitemap;
|
|
11117
11115
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-sitemap",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"packageManager": "pnpm@9.1.2",
|
|
6
6
|
"description": "Sitemap generator plugin for Vite",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"eslint-plugin-format": "^0.1.1",
|
|
28
28
|
"pkgroll": "^2.1.1",
|
|
29
29
|
"pnpm": "^9.1.2",
|
|
30
|
-
"sitemap-ts": "^1.7.
|
|
30
|
+
"sitemap-ts": "^1.7.2",
|
|
31
31
|
"taze": "^0.13.8",
|
|
32
32
|
"typescript": "^5.4.5",
|
|
33
33
|
"vite": "^5.2.11",
|