Repository: TanStack/router
Pull request #1595 (2024-05-15 11:33:42)

fix: take from into account when building urls

nx-cloud[bot]: # ☁️ Nx Cloud Report

CI is running for commit bcacb4b4204acd5a17e944d018cda055c4e5d899.

[📂 Click to track the progress, see the status, the terminal output, and the build insights.](https://cloud.nx.app/cipes/66449db0d59a942868aa1db7?utm_source=pull-request&utm_medium=comment)


---

Sent with 💌 from [NxCloud.](https://nx.app?utm_source=pull-request&utm_medium=comment)

Patch:
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 695ac9b91..4434aba07 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json
index 931cb1eb1..6730aac9e 100644
--- a/examples/react/basic-default-search-params/package.json
+++ b/examples/react/basic-default-search-params/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
diff --git a/examples/react/basic-file-based-codesplitting/package.json b/examples/react/basic-file-based-codesplitting/package.json
index bb5c3cc05..9feef7a75 100644
--- a/examples/react/basic-file-based-codesplitting/package.json
+++ b/examples/react/basic-file-based-codesplitting/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index ecdd0b0e0..9a9d6a0d0 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index 2f9295789..b1c4cf305 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
     "@tanstack/react-query-devtools": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json
index 0891d16a8..043c0a55c 100644
--- a/examples/react/basic-react-query/package.json
+++ b/examples/react/basic-react-query/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
     "@tanstack/react-query-devtools": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 55d6db2e8..336007bcb 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -12,9 +12,9 @@
     "debug": "node --inspect-brk server"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/start": "^1.32.6",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/start": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "get-port": "^7.0.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index 5fb874ee0..eb57db0ed 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -12,9 +12,9 @@
     "debug": "node --inspect-brk server"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/start": "^1.32.6",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/start": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "get-port": "^7.0.0",
diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json
index 37dad1254..c096ebd64 100644
--- a/examples/react/basic/package.json
+++ b/examples/react/basic/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json
index 7d6212e0b..00c558fcf 100644
--- a/examples/react/deferred-data/package.json
+++ b/examples/react/deferred-data/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index dd14180ea..ff146af1f 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index 67f4ea105..c889935b7 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
     "@tanstack/react-query-devtools": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json
index 2fdbaa24f..c18cfb012 100644
--- a/examples/react/kitchen-sink-react-query/package.json
+++ b/examples/react/kitchen-sink-react-query/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
     "@tanstack/react-query-devtools": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
     "react": "^18.2.0",
diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json
index a9c771f53..3019c6c27 100644
--- a/examples/react/kitchen-sink/package.json
+++ b/examples/react/kitchen-sink/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
     "react": "^18.2.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 08a174edd..3d351d9b1 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -12,8 +12,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json
index 5a64cb596..e65633b3e 100644
--- a/examples/react/location-masking/package.json
+++ b/examples/react/location-masking/package.json
@@ -11,8 +11,8 @@
   "dependencies": {
     "@radix-ui/react-dialog": "^1.0.5",
     "@tanstack/react-query": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json
index 02db9a8bf..de52a24ba 100644
--- a/examples/react/navigation-blocking/package.json
+++ b/examples/react/navigation-blocking/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@tanstack/react-query": "^5.17.8",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index cc04de23d..79ad29999 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "axios": "^1.6.5",
     "immer": "^10.0.3",
diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json
index 9bf3e2635..1fedbd560 100644
--- a/examples/react/quickstart/package.json
+++ b/examples/react/quickstart/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
   },
diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json
index 9528cd854..bb2cdb1a9 100644
--- a/examples/react/scroll-restoration/package.json
+++ b/examples/react/scroll-restoration/package.json
@@ -9,9 +9,9 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
     "@tanstack/react-virtual": "^3.0.1",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/router-devtools": "^1.32.8",
     "react": "^18.2.0",
     "react-dom": "^18.2.0"
   },
diff --git a/examples/react/vinxi-basic-ssr-streaming/package.json b/examples/react/vinxi-basic-ssr-streaming/package.json
index 8b6bad028..73df975d7 100644
--- a/examples/react/vinxi-basic-ssr-streaming/package.json
+++ b/examples/react/vinxi-basic-ssr-streaming/package.json
@@ -8,9 +8,9 @@
     "start": "vinxi start"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/start": "^1.32.6",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/start": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@vinxi/react": "0.2.2",
     "@vinxi/server-functions": "^0.3.2",
     "autoprefixer": "^10.4.19",
@@ -20,7 +20,7 @@
     "vinxi": "^0.3.11"
   },
   "devDependencies": {
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "@types/react": "^18.2.47",
     "@types/react-dom": "^18.2.18",
diff --git a/examples/react/vinxi-basic-ssr/package.json b/examples/react/vinxi-basic-ssr/package.json
index 6130896e3..9031fbb83 100644
--- a/examples/react/vinxi-basic-ssr/package.json
+++ b/examples/react/vinxi-basic-ssr/package.json
@@ -8,8 +8,8 @@
     "start": "vinxi start"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/start": "^1.32.6",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/start": "^1.32.8",
     "@vinxi/react": "0.1.1",
     "@vinxi/server-functions": "^0.1.1",
     "autoprefixer": "^10.4.15",
@@ -18,7 +18,7 @@
     "vinxi": "0.1.2"
   },
   "devDependencies": {
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "@types/react": "^18.2.47",
     "@types/react-dom": "^18.2.18",
diff --git a/examples/react/vinxi-basic/package.json b/examples/react/vinxi-basic/package.json
index 56be1594a..38ca9f9c0 100644
--- a/examples/react/vinxi-basic/package.json
+++ b/examples/react/vinxi-basic/package.json
@@ -8,8 +8,8 @@
     "start": "vinxi start"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/start": "^1.32.6",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/start": "^1.32.8",
     "@vinxi/react": "0.1.1",
     "@vinxi/server-functions": "^0.1.1",
     "autoprefixer": "^10.4.15",
@@ -18,7 +18,7 @@
     "vinxi": "0.1.2"
   },
   "devDependencies": {
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/router-devtools": "^1.32.8",
     "@tanstack/router-vite-plugin": "^1.32.2",
     "@types/react": "^18.2.47",
     "@types/react-dom": "^18.2.18",
diff --git a/examples/react/wip-trpc-react-query/package.json b/examples/react/wip-trpc-react-query/package.json
index 654c56fe8..b9310bb4f 100644
--- a/examples/react/wip-trpc-react-query/package.json
+++ b/examples/react/wip-trpc-react-query/package.json
@@ -13,8 +13,8 @@
   "dependencies": {
     "@tanstack/react-query": "^4.36.1",
     "@tanstack/react-query-devtools": "^4.36.1",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@trpc/client": "^10.45.0",
     "@trpc/react-query": "^10.45.0",
     "@trpc/server": "^10.45.0",
diff --git a/examples/react/wip-waku-rsc/package.json b/examples/react/wip-waku-rsc/package.json
index af6642741..de5171bbf 100644
--- a/examples/react/wip-waku-rsc/package.json
+++ b/examples/react/wip-waku-rsc/package.json
@@ -10,8 +10,8 @@
   },
   "dependencies": {
     "@hono/node-server": "^1.4.1",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "hono": "^3.12.0",
     "react": "18.3.0-canary-0cdfef19b-20231211",
     "react-dom": "18.3.0-canary-0cdfef19b-20231211",
diff --git a/examples/react/wip-with-bling/package.json b/examples/react/wip-with-bling/package.json
index 9c68dbe34..3a4a66d4c 100644
--- a/examples/react/wip-with-bling/package.json
+++ b/examples/react/wip-with-bling/package.json
@@ -13,10 +13,10 @@
   },
   "dependencies": {
     "@tanstack/bling": "^0.5.0",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/start": "^1.32.6",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/start": "^1.32.8",
     "@tanstack/react-store": "^0.2.1",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "fastify": "^4.25.2",
     "get-port": "^7.0.0",
diff --git a/examples/react/wip-with-framer-motion/package.json b/examples/react/wip-with-framer-motion/package.json
index 2b88cb319..6825791a8 100644
--- a/examples/react/wip-with-framer-motion/package.json
+++ b/examples/react/wip-with-framer-motion/package.json
@@ -9,8 +9,8 @@
     "start": "vite"
   },
   "dependencies": {
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "axios": "^1.6.5",
     "framer-motion": "^10.17.9",
     "immer": "^10.0.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index b1d03645d..6c1088814 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -13,8 +13,8 @@
   "dependencies": {
     "@tanstack/react-query": "^4.36.1",
     "@tanstack/react-query-devtools": "^4.36.1",
-    "@tanstack/react-router": "^1.32.5",
-    "@tanstack/router-devtools": "^1.32.5",
+    "@tanstack/react-router": "^1.32.8",
+    "@tanstack/router-devtools": "^1.32.8",
     "@trpc/client": "^10.45.0",
     "@trpc/react-query": "^10.45.0",
     "@trpc/server": "^10.45.0",
diff --git a/packages/react-router/package.json b/packages/react-router/package.json
index 2ab79ecdd..226ca0a4c 100644
--- a/packages/react-router/package.json
+++ b/packages/react-router/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/react-router",
-  "version": "1.32.5",
+  "version": "1.32.8",
   "description": "",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/react-router/src/Matches.tsx b/packages/react-router/src/Matches.tsx
index bef2e5a59..c1a751814 100644
--- a/packages/react-router/src/Matches.tsx
+++ b/packages/react-router/src/Matches.tsx
@@ -61,9 +61,9 @@ export interface RouteMatch<
   loaderDeps: TLoaderDeps
   preload: boolean
   invalid: boolean
-  meta?: Array<JSX.IntrinsicElements['meta']>
-  links?: Array<JSX.IntrinsicElements['link']>
-  scripts?: Array<JSX.IntrinsicElements['script']>
+  meta?: Array<React.JSX.IntrinsicElements['meta']>
+  links?: Array<React.JSX.IntrinsicElements['link']>
+  scripts?: Array<React.JSX.IntrinsicElements['script']>
   headers?: Record<string, string>
   globalNotFound?: boolean
   staticData: StaticDataRouteOption
diff --git a/packages/react-router/src/link.tsx b/packages/react-router/src/link.tsx
index e6a764637..42417463a 100644
--- a/packages/react-router/src/link.tsx
+++ b/packages/react-router/src/link.tsx
@@ -809,7 +809,7 @@ export interface LinkPropsChildren {
 type LinkComponentReactProps<TComp> = React.PropsWithoutRef<
   TComp extends React.FC<infer TProps> | React.Component<infer TProps>
     ? TProps
-    : TComp extends keyof JSX.IntrinsicElements
+    : TComp extends keyof React.JSX.IntrinsicElements
       ? Omit<React.HTMLProps<TComp>, 'children' | 'preload'>
       : never
 > &
@@ -818,7 +818,7 @@ type LinkComponentReactProps<TComp> = React.PropsWithoutRef<
       | React.FC<{ ref: infer TRef }>
       | React.Component<{ ref: infer TRef }>
       ? TRef
-      : TComp extends keyof JSX.IntrinsicElements
+      : TComp extends keyof React.JSX.IntrinsicElements
         ? React.ComponentRef<TComp>
         : never
   >
diff --git a/packages/react-router/src/route.ts b/packages/react-router/src/route.ts
index df836b8f4..e883c1c8c 100644
--- a/packages/react-router/src/route.ts
+++ b/packages/react-router/src/route.ts
@@ -274,9 +274,9 @@ export type UpdatableRouteOptions<
     matches: Array<TRouteMatch>
     params: TAllParams
     loaderData: TLoaderData
-  }) => Array<JSX.IntrinsicElements['meta']>
-  links?: () => Array<JSX.IntrinsicElements['link']>
-  scripts?: () => Array<JSX.IntrinsicElements['script']>
+  }) => Array<React.JSX.IntrinsicElements['meta']>
+  links?: () => Array<React.JSX.IntrinsicElements['link']>
+  scripts?: () => Array<React.JSX.IntrinsicElements['script']>
   headers?: (ctx: { loaderData: TLoaderData }) => Record<string, string>
 } & UpdatableStaticRouteOption
 
diff --git a/packages/react-router/src/router.ts b/packages/react-router/src/router.ts
index de1bded9e..17fb2d3e4 100644
--- a/packages/react-router/src/router.ts
+++ b/packages/react-router/src/router.ts
@@ -919,7 +919,7 @@ export class Router<
       } = {},
       matches?: Array<MakeRouteMatch<TRouteTree>>,
     ): ParsedLocation => {
-      let fromPath = this.latestLocation.pathname
+      let fromPath = dest.from || this.latestLocation.pathname
       let fromSearch = dest.fromSearch || this.latestLocation.search
 
       const fromMatches = this.matchRoutes(
diff --git a/packages/router-devtools/package.json b/packages/router-devtools/package.json
index 9518ca545..5a64ce54f 100644
--- a/packages/router-devtools/package.json
+++ b/packages/router-devtools/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/router-devtools",
-  "version": "1.32.5",
+  "version": "1.32.8",
   "description": "",
   "author": "Tanner Linsley",
   "license": "MIT",
diff --git a/packages/start/config.tsconfig.json b/packages/start/config.tsconfig.json
new file mode 100644
index 000000000..81a92ef7d
--- /dev/null
+++ b/packages/start/config.tsconfig.json
@@ -0,0 +1,9 @@
+{
+  "extends": "../../tsconfig.json",
+  "include": ["src/config/index.ts"],
+  "compilerOptions": {
+    "outDir": "dist/esm/config",
+    "target": "esnext",
+    "noEmit": false
+  }
+}
diff --git a/packages/start/package.json b/packages/start/package.json
index a9f988716..dded7fa57 100644
--- a/packages/start/package.json
+++ b/packages/start/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@tanstack/start",
-  "version": "1.32.6",
+  "version": "1.32.8",
   "description": "",
   "author": "Tanner Linsley",
   "license": "MIT",
@@ -28,8 +28,8 @@
     },
     "./config": {
       "import": {
-        "_types": "./src/config/index.d.ts",
-        "default": "./src/config/index.js"
+        "types": "./dist/esm/config/index.d.ts",
+        "default": "./dist/esm/config/index.js"
       }
     },
     "./client": {
@@ -90,7 +90,8 @@
     "test:eslint": "eslint --ext .ts,.tsx ./src",
     "test:types": "tsc --noEmit",
     "test:build": "publint --strict",
-    "build": "vite build"
+    "build": "vite build && pnpm build:config",
+    "build:config": "tsc --project config.tsconfig.json"
   },
   "keywords": [
     "react",
diff --git a/packages/start/src/config/index.js b/packages/start/src/config/index.ts
similarity index 75%
rename from packages/start/src/config/index.js
rename to packages/start/src/config/index.ts
index 757296829..d3d5e3965 100644
--- a/packages/start/src/config/index.js
+++ b/packages/start/src/config/index.ts
@@ -10,13 +10,17 @@ import { TanStackRouterVite } from '@tanstack/router-vite-plugin'
 import { serverFunctions } from '@vinxi/server-functions/plugin'
 import { serverTransform } from '@vinxi/server-functions/server'
 import { config } from 'vinxi/plugins/config'
-// import type * as vite from 'vite'
+import type * as vite from 'vite'
 // import { config } from 'vinxi/plugins/config'
 
 function startVite() {
   return config('start-vite', {
     ssr: {
-      // external: ['@tanstack/start'],
+      // external: [
+      //   '@tanstack/start/client-runtime',
+      //   '@tanstack/start/server-runtime',
+      //   '@tanstack/start/server-handler',
+      // ],
     },
     optimizeDeps: {
       // exclude: ['@tanstack/start'],
@@ -24,7 +28,11 @@ function startVite() {
   })
 }
 
-export function defineConfig(opts) {
+export function defineConfig(opts?: {
+  vite?: {
+    plugins: () => Array<vite.UserConfig>
+  }
+}) {
   return createApp({
     server: {
       preset: 'vercel',
@@ -47,15 +55,15 @@ export function defineConfig(opts) {
         target: 'server',
         plugins: () => [
           startVite(),
-          opts.vite?.(),
+
           TanStackRouterVite({
             experimental: {
-              enableCodeSplitting: false,
+              enableCodeSplitting: true,
             },
           }),
           tsconfigPaths(),
           serverTransform({
-            runtime: resolveRelativePath('../server-runtime/index.tsx'),
+            runtime: resolveRelativePath('../server-runtime'),
           }),
         ],
         link: {
@@ -74,23 +82,23 @@ export function defineConfig(opts) {
         plugins: () => [
           TanStackRouterVite({
             experimental: {
-              enableCodeSplitting: false,
+              enableCodeSplitting: true,
             },
           }),
           startVite(),
-          opts.vite?.(),
+
           tsconfigPaths(),
           serverFunctions.client({
-            runtime: resolveRelativePath('../client-runtime/index.tsx'),
+            runtime: resolveRelativePath('../client-runtime'),
           }),
           reactRefresh(),
         ],
       },
       serverFunctions.router({
         name: 'server',
-        plugins: () => [startVite(), opts.vite?.(), tsconfigPaths()],
-        handler: resolveRelativePath('../server-handler/index.tsx'),
-        runtime: resolveRelativePath('../server-runtime/index.tsx'),
+        plugins: () => [startVite(), tsconfigPaths()],
+        handler: resolveRelativePath('../server-handler'),
+        runtime: resolveRelativePath('../server-runtime'),
       }),
     ],
   })
diff --git a/packages/start/vite.config.ts b/packages/start/vite.config.ts
index 3716b0fad..051fa430e 100644
--- a/packages/start/vite.config.ts
+++ b/packages/start/vite.config.ts
@@ -40,7 +40,6 @@ export default mergeConfig(
   config,
   tanstackBuildConfig({
     entry: [
-      './src/constants.ts',
       './src/client/index.tsx',
       './src/server/index.tsx',
       './src/client-runtime/index.tsx',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 71025c89c..4f2a2b1d8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -93,10 +93,10 @@ importers:
   examples/react/authenticated-routes:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -136,10 +136,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -170,10 +170,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -204,10 +204,10 @@ importers:
   examples/react/basic-file-based:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -244,10 +244,10 @@ importers:
   examples/react/basic-file-based-codesplitting:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -290,10 +290,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(@tanstack/react-query@5.17.8)(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -327,10 +327,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(@tanstack/react-query@5.17.8)(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -367,16 +367,16 @@ importers:
   examples/react/basic-ssr-file-based:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
         version: link:../../../packages/router-vite-plugin
       '@tanstack/start':
-        specifier: ^1.32.6
+        specifier: ^1.32.8
         version: link:../../../packages/start
       axios:
         specifier: ^1.6.5
@@ -431,16 +431,16 @@ importers:
   examples/react/basic-ssr-streaming-file-based:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
         version: link:../../../packages/router-vite-plugin
       '@tanstack/start':
-        specifier: ^1.32.6
+        specifier: ^1.32.8
         version: link:../../../packages/start
       axios:
         specifier: ^1.6.5
@@ -498,10 +498,10 @@ importers:
   examples/react/deferred-data:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -535,10 +535,10 @@ importers:
   examples/react/kitchen-sink:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -572,10 +572,10 @@ importers:
   examples/react/kitchen-sink-file-based:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -618,10 +618,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(@tanstack/react-query@5.17.8)(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -661,10 +661,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(@tanstack/react-query@5.17.8)(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -704,10 +704,10 @@ importers:
         specifier: ^5.17.8
         version: 5.36.0(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -750,10 +750,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -784,10 +784,10 @@ importers:
         specifier: ^5.17.8
         version: 5.17.8(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -815,10 +815,10 @@ importers:
   examples/react/quickstart:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       react:
         specifier: ^18.2.0
@@ -843,10 +843,10 @@ importers:
   examples/react/quickstart-file-based:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -883,13 +883,13 @@ importers:
   examples/react/scroll-restoration:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/react-virtual':
         specifier: ^3.0.1
         version: 3.0.1(react-dom@18.2.0)(react@18.2.0)
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       react:
         specifier: ^18.2.0
@@ -914,10 +914,10 @@ importers:
   examples/react/vinxi-basic:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/start':
-        specifier: ^1.32.6
+        specifier: ^1.32.8
         version: link:../../../packages/start
       '@vinxi/react':
         specifier: 0.1.1
@@ -939,7 +939,7 @@ importers:
         version: 0.1.2(@types/node@20.12.11)(preact@10.21.0)(rollup@4.17.2)
     devDependencies:
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -957,10 +957,10 @@ importers:
   examples/react/vinxi-basic-ssr:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/start':
-        specifier: ^1.32.6
+        specifier: ^1.32.8
         version: link:../../../packages/start
       '@vinxi/react':
         specifier: 0.1.1
@@ -982,7 +982,7 @@ importers:
         version: 0.1.2(@types/node@20.12.11)(preact@10.21.0)(rollup@4.17.2)
     devDependencies:
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/router-vite-plugin':
         specifier: ^1.32.2
@@ -1000,13 +1000,13 @@ importers:
   examples/react/vinxi-basic-ssr-streaming:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/start':
-        specifier: ^1.32.6
+        specifier: ^1.32.8
         version: link:../../../packages/start
       '@vinxi/react':
         specifier: 0.2.2
@@ -1052,10 +1052,10 @@ importers:
         specifier: ^4.36.1
         version: 4.36.1(@tanstack/react-query@4.36.1)(react-dom@18.2.0)(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@trpc/client':
         specifier: ^10.45.0
@@ -1113,10 +1113,10 @@ importers:
         specifier: ^1.4.1
         version: 1.4.1
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       hono:
         specifier: ^3.12.0
@@ -1159,16 +1159,16 @@ importers:
         specifier: ^0.5.0
         version: 0.5.0(vite@5.0.13)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/react-store':
         specifier: ^0.2.1
         version: 0.2.1(react-dom@18.3.0-canary-ab31a9ed2-20230824)(react@18.3.0-canary-ab31a9ed2-20230824)
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@tanstack/start':
-        specifier: ^1.32.6
+        specifier: ^1.32.8
         version: link:../../../packages/start
       axios:
         specifier: ^1.6.5
@@ -1238,10 +1238,10 @@ importers:
   examples/react/wip-with-framer-motion:
     dependencies:
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       axios:
         specifier: ^1.6.5
@@ -1284,10 +1284,10 @@ importers:
         specifier: ^4.36.1
         version: 4.36.1(@tanstack/react-query@4.36.1)(react-dom@18.2.0)(react@18.2.0)
       '@tanstack/react-router':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/react-router
       '@tanstack/router-devtools':
-        specifier: ^1.32.5
+        specifier: ^1.32.8
         version: link:../../../packages/router-devtools
       '@trpc/client':
         specifier: ^10.45.0


Test patch:
diff --git a/packages/react-router/tests/link.test.tsx b/packages/react-router/tests/link.test.tsx
index 5d08bb469..c19b8be5d 100644
--- a/packages/react-router/tests/link.test.tsx
+++ b/packages/react-router/tests/link.test.tsx
@@ -1,15 +1,17 @@
-import React from 'react'
-import { describe, it, expect, afterEach } from 'vitest'
-import { render, cleanup } from '@testing-library/react'
+// eslint-disable-next-line @typescript-eslint/consistent-type-imports
+import * as React from 'react'
+
+import { afterEach, describe, expect, it } from 'vitest'
+import { cleanup, render } from '@testing-library/react'
 
 import {
-  createRouter,
-  createRootRoute,
-  createRoute,
-  createMemoryHistory,
+  Link,
   RouterProvider,
   createLink,
-  Link,
+  createMemoryHistory,
+  createRootRoute,
+  createRoute,
+  createRouter,
 } from '../src'
 
 afterEach(() => {
@@ -40,6 +42,132 @@ describe('Link', () => {
 
     expect(customElement!.hasAttribute('disabled')).toBe(false)
   })
+  describe('building urls', () => {
+    const buildRouter = async (
+      component: React.ReactNode,
+      opts?: { page?: string },
+    ) => {
+      const rootRoute = createRootRoute()
+      const indexRoute = createRoute({
+        getParentRoute: () => rootRoute,
+        path: '/',
+      })
+
+      const invoicesRoute = createRoute({
+        getParentRoute: () => rootRoute,
+        path: 'invoices',
+      })
+
+      const invoicesIndexRoute = createRoute({
+        getParentRoute: () => invoicesRoute,
+        path: '/',
+      })
+
+      const invoiceRoute = createRoute({
+        getParentRoute: () => invoicesRoute,
+        path: '$invoiceId',
+      })
+
+      const subInvoiceRoute = createRoute({
+        getParentRoute: () => invoiceRoute,
+        path: 'sub',
+      })
+
+      const postsRoute = createRoute({
+        getParentRoute: () => rootRoute,
+        path: 'posts',
+      })
+
+      const postsIndexRoute = createRoute({
+        getParentRoute: () => postsRoute,
+        path: '/',
+      })
+
+      const postRoute = createRoute({
+        getParentRoute: () => postsRoute,
+        path: '$postId',
+      })
+
+      const router = createRouter({
+        defaultComponent: () => component,
+        routeTree: rootRoute.addChildren([
+          invoicesRoute.addChildren([
+            invoicesIndexRoute,
+            invoiceRoute.addChildren([subInvoiceRoute]),
+          ]),
+          postsRoute.addChildren([postsIndexRoute, postRoute]),
+          indexRoute,
+        ]),
+        history: createMemoryHistory({ initialEntries: [opts?.page ?? '/'] }),
+      })
+
+      await router.load()
+
+      return router
+    }
+
+    it('should build correct url for absolute to property', async () => {
+      const router = await buildRouter(<Link to="/invoices/123/sub">Link</Link>)
+
+      const rendered = render(<RouterProvider router={router} />)
+
+      const link = rendered.getByText('Link')
+
+      expect(link.getAttribute('href')).toBe('/invoices/123/sub')
+    })
+
+    it('should build correct url for relative to property', async () => {
+      const router = await buildRouter(
+        <Link from="/invoices/123" to="./sub">
+          Link
+        </Link>,
+        { page: '/invoices/123' },
+      )
+
+      const rendered = render(<RouterProvider router={router} />)
+
+      const link = rendered.getByText('Link')
+
+      expect(link.getAttribute('href')).toBe('/invoices/123/sub')
+    })
+
+    it('should ignore from for absolute links', async () => {
+      const router = await buildRouter(
+        <Link from="/invoices/123" to="/invoices/123/sub">
+          Link
+        </Link>,
+        { page: '/' },
+      )
+
+      const rendered = render(<RouterProvider router={router} />)
+
+      const link = rendered.getByText('Link')
+
+      expect(link.getAttribute('href')).toBe('/invoices/123/sub')
+    })
+
+    it('should take from into account for building relative urls', async () => {
+      const router = await buildRouter(
+        <div>
+          <Link from="/invoices/123" to="sub">
+            sub
+          </Link>
+          <Link from="/invoices/123" to="./sub">
+            dot-sub
+          </Link>
+        </div>,
+        { page: '/' },
+      )
+
+      const rendered = render(<RouterProvider router={router} />)
+
+      const sub = rendered.getByText('sub')
+      const dotSub = rendered.getByText('dot-sub')
+
+      expect(sub.getAttribute('href')).toBe('/invoices/123/sub')
+      expect(dotSub.getAttribute('href')).toBe('/invoices/123/sub')
+    })
+  })
 })
 
 describe('createLink', () => {