Skip to content

Commit 91cfabb

Browse files
committed
refactor(router): remove global file route helpers
1 parent 837917a commit 91cfabb

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

packages/react-router/src/router.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { RouterCore } from '@tanstack/router-core'
2-
import { createFileRoute, createLazyFileRoute } from './fileRoute'
32
import { getStoreFactory } from './routerStores'
43
import type { RouterHistory } from '@tanstack/history'
54
import type {
@@ -118,11 +117,3 @@ export class Router<
118117
super(options, getStoreFactory)
119118
}
120119
}
121-
122-
if (typeof globalThis !== 'undefined') {
123-
;(globalThis as any).createFileRoute = createFileRoute
124-
;(globalThis as any).createLazyFileRoute = createLazyFileRoute
125-
} else if (typeof window !== 'undefined') {
126-
;(window as any).createFileRoute = createFileRoute
127-
;(window as any).createLazyFileRoute = createLazyFileRoute
128-
}

packages/solid-router/src/router.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { RouterCore } from '@tanstack/router-core'
2-
import { createFileRoute, createLazyFileRoute } from './fileRoute'
32
import { getStoreFactory } from './routerStores'
43
import type { RouterHistory } from '@tanstack/history'
54
import type {
@@ -103,11 +102,3 @@ export class Router<
103102
super(options, getStoreFactory)
104103
}
105104
}
106-
107-
if (typeof globalThis !== 'undefined') {
108-
;(globalThis as any).createFileRoute = createFileRoute
109-
;(globalThis as any).createLazyFileRoute = createLazyFileRoute
110-
} else if (typeof window !== 'undefined') {
111-
;(window as any).createFileRoute = createFileRoute
112-
;(window as any).createLazyFileRoute = createLazyFileRoute
113-
}

0 commit comments

Comments
 (0)