@tanstack/router-core 1.142.13 → 1.143.3

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.
@@ -206,11 +206,15 @@ class RouterCore {
206
206
  const searchStr = this.options.stringifySearch(parsedSearch);
207
207
  url.search = searchStr;
208
208
  const fullPath = url.href.replace(url.origin, "");
209
+ const internalPathname = url.pathname;
210
+ const urlForOutput = new URL(url.href);
211
+ const rewrittenUrl = executeRewriteOutput(this.rewrite, urlForOutput);
212
+ const publicHref = rewrittenUrl.pathname + rewrittenUrl.search + rewrittenUrl.hash;
209
213
  return {
210
214
  href: fullPath,
211
- publicHref: href,
215
+ publicHref,
212
216
  url,
213
- pathname: decodePath(url.pathname),
217
+ pathname: decodePath(internalPathname),
214
218
  searchStr,
215
219
  search: replaceEqualDeep(previousLocation?.search, parsedSearch),
216
220
  hash: url.hash.split("#").reverse()[0] ?? "",