-
-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(router-vite-plugin): proxy for re-exporting from `@tanstack/…
…router-plugin/vite` (#1785) * chore: this route-tree has not been generated * chore: remove tests * refactor(router-plugin): export configSchema * refactor(start): use the exports from router-plugin * refactor(router-vite-plugin): just a proxy doing exports * fix(router-plugin): do not perform code-splitting unless perms are given
- Loading branch information
1 parent
38b7488
commit 05d1a1d
Showing
38 changed files
with
96 additions
and
2,579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* prettier-ignore-start */ | ||
|
||
/* eslint-disable */ | ||
|
||
// @ts-nocheck | ||
|
||
// noinspection JSUnusedGlobalSymbols | ||
|
||
// This file is auto-generated by TanStack Router | ||
|
||
// Import Routes | ||
|
||
import { Route as rootRoute } from './routes/__root' | ||
import { Route as IndexImport } from './routes/index' | ||
|
||
// Create/Update Routes | ||
|
||
const IndexRoute = IndexImport.update({ | ||
path: '/', | ||
getParentRoute: () => rootRoute, | ||
} as any) | ||
|
||
// Populate the FileRoutesByPath interface | ||
|
||
declare module '@tanstack/react-router' { | ||
interface FileRoutesByPath { | ||
'/': { | ||
id: '/' | ||
path: '/' | ||
fullPath: '/' | ||
preLoaderRoute: typeof IndexImport | ||
parentRoute: typeof rootRoute | ||
} | ||
} | ||
} | ||
|
||
// Create and export the route tree | ||
|
||
export const routeTree = rootRoute.addChildren({ IndexRoute }) | ||
|
||
/* prettier-ignore-end */ | ||
|
||
/* ROUTE_MANIFEST_START | ||
{ | ||
"routes": { | ||
"__root__": { | ||
"filePath": "__root.tsx", | ||
"children": [ | ||
"/" | ||
] | ||
}, | ||
"/": { | ||
"filePath": "index.tsx" | ||
} | ||
} | ||
} | ||
ROUTE_MANIFEST_END */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export { unpluginRouterCodeSplitter } from './code-splitter' | ||
export { unpluginRouterGenerator } from './router-generator' | ||
export { configSchema } from './config' | ||
export type { Config } from './config' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import { unpluginRouterCodeSplitter } from './code-splitter' | ||
import { configSchema } from './config' | ||
import { unpluginRouterGenerator } from './router-generator' | ||
|
||
import type { PluginOptions } from './config' | ||
import type { Config } from './config' | ||
import type { VitePlugin } from 'unplugin' | ||
|
||
export const TanStackRouterGeneratorVite = unpluginRouterGenerator.vite | ||
export const TanStackRouterCodeSplitterVite = unpluginRouterCodeSplitter.vite | ||
const TanStackRouterGeneratorVite = unpluginRouterGenerator.vite | ||
const TanStackRouterCodeSplitterVite = unpluginRouterCodeSplitter.vite | ||
|
||
export function TanStackRouterVite( | ||
inlineConfig?: Partial<PluginOptions>, | ||
): Array<VitePlugin> { | ||
function TanStackRouterVite(inlineConfig?: Partial<Config>): Array<VitePlugin> { | ||
return [ | ||
TanStackRouterGeneratorVite(inlineConfig) as VitePlugin, | ||
TanStackRouterCodeSplitterVite(inlineConfig) as VitePlugin, | ||
] | ||
} | ||
|
||
export type Config = PluginOptions | ||
export { | ||
configSchema, | ||
TanStackRouterGeneratorVite, | ||
TanStackRouterCodeSplitterVite, | ||
TanStackRouterVite, | ||
} | ||
export type { Config } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.