@tanstack/router-core 1.146.0 → 1.146.1

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.
@@ -517,7 +517,9 @@ class RouterCore {
517
517
  const parsed = history.parseHref(href, {
518
518
  __TSR_index: replace ? currentIndex : currentIndex + 1
519
519
  });
520
- rest.to = parsed.pathname;
520
+ const hrefUrl = new URL(parsed.pathname, this.origin);
521
+ const rewrittenUrl = rewrite.executeRewriteInput(this.rewrite, hrefUrl);
522
+ rest.to = rewrittenUrl.pathname;
521
523
  rest.search = this.options.parseSearch(parsed.search);
522
524
  rest.hash = parsed.hash.slice(1);
523
525
  }
@@ -560,7 +562,7 @@ class RouterCore {
560
562
  reloadDocument = true;
561
563
  }
562
564
  if (reloadDocument) {
563
- if (!href || !publicHref && !hrefIsUrl) {
565
+ if (to !== void 0 || !href) {
564
566
  const location = this.buildLocation({ to, ...rest });
565
567
  href = href ?? location.url.href;
566
568
  publicHref = publicHref ?? location.url.href;