@rspress/shared 1.12.2 → 1.13.0

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 CHANGED
@@ -1170,7 +1170,7 @@ function normalizePosixPath(id) {
1170
1170
  }
1171
1171
  var inBrowser = () => !process.env.__SSR__;
1172
1172
  function addLeadingSlash(url) {
1173
- return url.charAt(0) === "/" || url.startsWith("https") ? url : `/${url}`;
1173
+ return url.charAt(0) === "/" || isExternalUrl(url) ? url : `/${url}`;
1174
1174
  }
1175
1175
  function removeLeadingSlash(url) {
1176
1176
  return url.charAt(0) === "/" ? url.slice(1) : url;
package/dist/index.mjs CHANGED
@@ -1112,7 +1112,7 @@ function normalizePosixPath(id) {
1112
1112
  }
1113
1113
  var inBrowser = () => !process.env.__SSR__;
1114
1114
  function addLeadingSlash(url) {
1115
- return url.charAt(0) === "/" || url.startsWith("https") ? url : `/${url}`;
1115
+ return url.charAt(0) === "/" || isExternalUrl(url) ? url : `/${url}`;
1116
1116
  }
1117
1117
  function removeLeadingSlash(url) {
1118
1118
  return url.charAt(0) === "/" ? url.slice(1) : url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "1.12.2",
3
+ "version": "1.13.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",