Full-document SSR, Streaming, Server Functions, bundling and more,
powered by TanStack Router, Nitro{' '}
and Vite. Ready to deploy to your favorite hosting
@@ -145,12 +187,21 @@ export default function VersionIndex() {
@@ -158,7 +209,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
{/*
+ >
@@ -217,7 +268,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
-
*/}
+
*/}
{/*
@@ -263,7 +314,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
)
})}
-
*/}
+
*/}
{/*
@@ -306,17 +357,19 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
))}
-
*/}
+ */}
Partners
-
+ dark:bg-gray-800 dark:shadow-none"
+ >
Start You?
@@ -326,7 +379,10 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
beyond the call of sponsorship. Are you as invested in TanStack
Start as we are? Let's push the boundaries of Start together!
@@ -355,8 +421,10 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
-
+
This ad helps us be happy about our invested time and not burn out and
rage-quit OSS. Yay money! 😉
@@ -399,7 +467,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
))}
- */}
+ */}
{/* {[''].includes(framework) ? (
@@ -416,7 +484,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
and let's get to work!
- ) : (
+ ) : (
- )} */}
+ )} */}
{/*
@@ -451,7 +519,8 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
Read the Docs!
-
*/}
+ */}
- ;
-}
\ No newline at end of file
+
+ )
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/using.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/using.tsx
index abe0e68a9bf..e9b71738046 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/using.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/using.tsx
@@ -1,18 +1,10 @@
const DummyPostResource = (postId: string) => ({
- postData: {
- id: postId,
- title: 'dummy',
- body: 'dummy'
- },
- [Symbol.dispose]: () => console.log('disposing!')
-});
+ postData: { id: postId, title: 'dummy', body: 'dummy' },
+ [Symbol.dispose]: () => console.log('disposing!'),
+})
export const Route = createFileRoute({
- loader: ({
- params: {
- postId
- }
- }) => {
- using dummyPost = DummyPostResource(postId);
- return dummyPost.postData;
- }
-});
\ No newline at end of file
+ loader: ({ params: { postId } }) => {
+ using dummyPost = DummyPostResource(postId)
+ return dummyPost.postData
+ },
+})
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/destructuring.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/destructuring.tsx
index 858c5c0e051..d80f17484f8 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/destructuring.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/destructuring.tsx
@@ -1,11 +1,11 @@
-import thing from 'thing';
+import thing from 'thing'
+
export function test() {
const {
foo: {
- bar: {
- destructured
- }
- }
- } = thing;
- return destructured;
-}
\ No newline at end of file
+ bar: { destructured },
+ },
+ } = thing
+
+ return destructured
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/explicit-undefined-component.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/explicit-undefined-component.tsx
index b4d1f917199..4fdd9d1c686 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/explicit-undefined-component.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/explicit-undefined-component.tsx
@@ -1,5 +1,6 @@
-import React from 'react';
-import { createFileRoute } from '@tanstack/react-router';
+import React from 'react'
+import { createFileRoute } from '@tanstack/react-router'
+
export const Route = createFileRoute('/')({
- component: undefined
-});
\ No newline at end of file
+ component: undefined,
+})
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/export-default-component.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/export-default-component.tsx
index d67a3dbaca3..c5198b9e004 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/export-default-component.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/export-default-component.tsx
@@ -1,12 +1,16 @@
-console.warn("[tanstack-router] These exports from \"export-default-component.tsx\" will not be code-split and will increase your bundle size:\n- Home\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import React, { useState } from 'react';
-import { createFileRoute } from '@tanstack/react-router';
+import React, { useState } from 'react'
+import { createFileRoute } from '@tanstack/react-router'
+
export const Route = createFileRoute('/home')({
- component: Home
-});
+ component: Home,
+})
+
export default function Home() {
- const [one, setOne] = useState('this is from a state');
- return
+ const [one, setOne] = useState('this is from a state')
+
+ return (
+
{one}
-
;
-}
\ No newline at end of file
+
+ )
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/function-as-parameter.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/function-as-parameter.tsx
index 23e2cd0f036..3ae9710cd56 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/function-as-parameter.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/function-as-parameter.tsx
@@ -1,20 +1,29 @@
-import * as React from 'react';
+import * as React from 'react'
// @ts-expect-error
-import { useMemo } from 'tan-react';
-const useUsedVar = 'i-am-unused';
+import { useMemo } from 'tan-react'
+
+const useUsedVar = 'i-am-unused'
+
const ReactUseMemoCall1 = React.useMemo(function performAction() {
- return 'true';
-}, []);
-console.info(ReactUseMemoCall1);
+ return 'true'
+}, [])
+
+console.info(ReactUseMemoCall1)
+
const ReactUseMemoCall2 = React.useMemo(() => {
- return 'true';
-}, []);
-console.info(ReactUseMemoCall2);
+ return 'true'
+}, [])
+
+console.info(ReactUseMemoCall2)
+
const UseMemoCall1 = useMemo(function performAction() {
- return 'true';
-}, []);
-console.info(UseMemoCall1);
+ return 'true'
+}, [])
+
+console.info(UseMemoCall1)
+
const UseMemoCall2 = useMemo(() => {
- return 'true';
-}, []);
-console.info(UseMemoCall2);
\ No newline at end of file
+ return 'true'
+}, [])
+
+console.info(UseMemoCall2)
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-const.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-const.tsx
index d3ffcba547b..f256b01a83b 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-const.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-const.tsx
@@ -1,15 +1,18 @@
-console.warn("[tanstack-router] These exports from \"retain-exports-const.tsx\" will not be code-split and will increase your bundle size:\n- Layout\n- loaderFn\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import * as React from 'react';
-import { createFileRoute, Outlet } from '@tanstack/react-router';
-import { importedComponent as ImportedComponent, importedLoader } from '../../shared/imported';
+import * as React from 'react'
+import { createFileRoute, Outlet } from '@tanstack/react-router'
+import {
+ importedComponent as ImportedComponent,
+ importedLoader,
+} from '../../shared/imported'
+
export const loaderFn = () => {
- return importedLoader();
-};
+ return importedLoader()
+}
+
const Layout = () => {
- return
-
+ return (
+
+
- ;
-};
+
+ )
+}
+
export const Route = createFileRoute('/_layout')({
component: Layout,
- loader: loaderFn
-});
-const HEADER_HEIGHT = '63px';
-export const SIDEBAR_WIDTH = '150px';
-export const SIDEBAR_MINI_WIDTH = '80px';
-const ASIDE_WIDTH = '250px';
-export default Layout;
\ No newline at end of file
+ loader: loaderFn,
+})
+
+const HEADER_HEIGHT = '63px'
+export const SIDEBAR_WIDTH = '150px'
+export const SIDEBAR_MINI_WIDTH = '80px'
+const ASIDE_WIDTH = '250px'
+
+export default Layout
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-function.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-function.tsx
index f608cbe869b..298c388e650 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-function.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/retain-exports-function.tsx
@@ -1,15 +1,18 @@
-console.warn("[tanstack-router] These exports from \"retain-exports-function.tsx\" will not be code-split and will increase your bundle size:\n- Layout\n- loaderFn\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import * as React from 'react';
-import { createFileRoute, Outlet } from '@tanstack/react-router';
-import { importedComponent as ImportedComponent, importedLoader } from '../../shared/imported';
+import * as React from 'react'
+import { createFileRoute, Outlet } from '@tanstack/react-router'
+import {
+ importedComponent as ImportedComponent,
+ importedLoader,
+} from '../../shared/imported'
+
export function loaderFn() {
- return importedLoader();
+ return importedLoader()
}
+
function Layout() {
- return
-
+ return (
+
+
- ;
+
+ )
}
+
export const Route = createFileRoute('/_layout')({
component: Layout,
- loader: loaderFn
-});
-const HEADER_HEIGHT = '63px';
-export const SIDEBAR_WIDTH = '150px';
-export const SIDEBAR_MINI_WIDTH = '80px';
-const ASIDE_WIDTH = '250px';
-export default Layout;
\ No newline at end of file
+ loader: loaderFn,
+})
+
+const HEADER_HEIGHT = '63px'
+export const SIDEBAR_WIDTH = '150px'
+export const SIDEBAR_MINI_WIDTH = '80px'
+const ASIDE_WIDTH = '250px'
+
+export default Layout
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/undefined-literals.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/undefined-literals.tsx
index 1491ba7c3a7..0c6e4f01aa9 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/undefined-literals.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/undefined-literals.tsx
@@ -1,7 +1,8 @@
-import { createFileRoute } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router'
+
export const Route = createFileRoute('/undefined-test')({
component: undefined,
errorComponent: undefined,
pendingComponent: undefined,
- notFoundComponent: undefined
-});
\ No newline at end of file
+ notFoundComponent: undefined,
+})
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/useStateDestructure.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/useStateDestructure.tsx
index 5ca9e1f339e..8f79e69bf03 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/useStateDestructure.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/useStateDestructure.tsx
@@ -1,121 +1,163 @@
-console.warn("[tanstack-router] These exports from \"useStateDestructure.tsx\" will not be code-split and will increase your bundle size:\n- VersionIndex\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import * as React from 'react';
-import { CgCornerUpLeft, CgSpinner } from 'react-icons/cg';
-import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaDiscord, FaGithub, FaTshirt, FaTwitter } from 'react-icons/fa';
-import { Await, Link, getRouteApi } from '@tanstack/react-router';
-import { Carbon } from '~/components/Carbon';
-import { Footer } from '~/components/Footer';
-import { VscPreview, VscWand } from 'react-icons/vsc';
-import { TbHeartHandshake } from 'react-icons/tb';
-import SponsorPack from '~/components/SponsorPack';
-import { startProject } from '~/projects/start';
-import { createFileRoute } from '@tanstack/react-router';
-import { Framework, getBranch } from '~/projects';
-import { seo } from '~/utils/seo';
-const menu = [{
- label:
+import * as React from 'react'
+
+import { CgCornerUpLeft, CgSpinner } from 'react-icons/cg'
+import {
+ FaBolt,
+ FaBook,
+ FaCheckCircle,
+ FaCogs,
+ FaDiscord,
+ FaGithub,
+ FaTshirt,
+ FaTwitter,
+} from 'react-icons/fa'
+import { Await, Link, getRouteApi } from '@tanstack/react-router'
+import { Carbon } from '~/components/Carbon'
+import { Footer } from '~/components/Footer'
+import { VscPreview, VscWand } from 'react-icons/vsc'
+import { TbHeartHandshake } from 'react-icons/tb'
+import SponsorPack from '~/components/SponsorPack'
+import { startProject } from '~/projects/start'
+import { createFileRoute } from '@tanstack/react-router'
+import { Framework, getBranch } from '~/projects'
+import { seo } from '~/utils/seo'
+
+const menu = [
+ {
+ label: (
+
Full-document SSR, Streaming, Server Functions, bundling and more,
powered by TanStack Router, Nitro{' '}
and Vite. Ready to deploy to your favorite hosting
@@ -145,12 +187,21 @@ export default function VersionIndex() {
@@ -158,7 +209,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
{/*
+ >
@@ -217,7 +268,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
-
*/}
+
*/}
{/*
@@ -263,7 +314,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
)
})}
-
*/}
+
*/}
{/*
@@ -306,17 +357,19 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
))}
-
*/}
+ */}
Partners
-
+ dark:bg-gray-800 dark:shadow-none"
+ >
Start You?
@@ -326,7 +379,10 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
beyond the call of sponsorship. Are you as invested in TanStack
Start as we are? Let's push the boundaries of Start together!
@@ -355,8 +421,10 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
-
+
This ad helps us be happy about our invested time and not burn out and
rage-quit OSS. Yay money! 😉
@@ -399,7 +467,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
))}
- */}
+ */}
{/* {[''].includes(framework) ? (
@@ -416,7 +484,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
and let's get to work!
- ) : (
+ ) : (
- )} */}
+ )} */}
{/*
@@ -451,7 +519,8 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
Read the Docs!
-
*/}
+ */}
- ;
-}
\ No newline at end of file
+
+ )
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/destructuring.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/destructuring.tsx
index 858c5c0e051..d80f17484f8 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/destructuring.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/destructuring.tsx
@@ -1,11 +1,11 @@
-import thing from 'thing';
+import thing from 'thing'
+
export function test() {
const {
foo: {
- bar: {
- destructured
- }
- }
- } = thing;
- return destructured;
-}
\ No newline at end of file
+ bar: { destructured },
+ },
+ } = thing
+
+ return destructured
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/explicit-undefined-component.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/explicit-undefined-component.tsx
index b4d1f917199..4fdd9d1c686 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/explicit-undefined-component.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/explicit-undefined-component.tsx
@@ -1,5 +1,6 @@
-import React from 'react';
-import { createFileRoute } from '@tanstack/react-router';
+import React from 'react'
+import { createFileRoute } from '@tanstack/react-router'
+
export const Route = createFileRoute('/')({
- component: undefined
-});
\ No newline at end of file
+ component: undefined,
+})
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/export-default-component.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/export-default-component.tsx
index d67a3dbaca3..c5198b9e004 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/export-default-component.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/export-default-component.tsx
@@ -1,12 +1,16 @@
-console.warn("[tanstack-router] These exports from \"export-default-component.tsx\" will not be code-split and will increase your bundle size:\n- Home\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import React, { useState } from 'react';
-import { createFileRoute } from '@tanstack/react-router';
+import React, { useState } from 'react'
+import { createFileRoute } from '@tanstack/react-router'
+
export const Route = createFileRoute('/home')({
- component: Home
-});
+ component: Home,
+})
+
export default function Home() {
- const [one, setOne] = useState('this is from a state');
- return
+ const [one, setOne] = useState('this is from a state')
+
+ return (
+
{one}
-
;
-}
\ No newline at end of file
+
+ )
+}
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/function-as-parameter.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/function-as-parameter.tsx
index 23e2cd0f036..3ae9710cd56 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/function-as-parameter.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/function-as-parameter.tsx
@@ -1,20 +1,29 @@
-import * as React from 'react';
+import * as React from 'react'
// @ts-expect-error
-import { useMemo } from 'tan-react';
-const useUsedVar = 'i-am-unused';
+import { useMemo } from 'tan-react'
+
+const useUsedVar = 'i-am-unused'
+
const ReactUseMemoCall1 = React.useMemo(function performAction() {
- return 'true';
-}, []);
-console.info(ReactUseMemoCall1);
+ return 'true'
+}, [])
+
+console.info(ReactUseMemoCall1)
+
const ReactUseMemoCall2 = React.useMemo(() => {
- return 'true';
-}, []);
-console.info(ReactUseMemoCall2);
+ return 'true'
+}, [])
+
+console.info(ReactUseMemoCall2)
+
const UseMemoCall1 = useMemo(function performAction() {
- return 'true';
-}, []);
-console.info(UseMemoCall1);
+ return 'true'
+}, [])
+
+console.info(UseMemoCall1)
+
const UseMemoCall2 = useMemo(() => {
- return 'true';
-}, []);
-console.info(UseMemoCall2);
\ No newline at end of file
+ return 'true'
+}, [])
+
+console.info(UseMemoCall2)
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-const.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-const.tsx
index d3ffcba547b..f256b01a83b 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-const.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-const.tsx
@@ -1,15 +1,18 @@
-console.warn("[tanstack-router] These exports from \"retain-exports-const.tsx\" will not be code-split and will increase your bundle size:\n- Layout\n- loaderFn\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import * as React from 'react';
-import { createFileRoute, Outlet } from '@tanstack/react-router';
-import { importedComponent as ImportedComponent, importedLoader } from '../../shared/imported';
+import * as React from 'react'
+import { createFileRoute, Outlet } from '@tanstack/react-router'
+import {
+ importedComponent as ImportedComponent,
+ importedLoader,
+} from '../../shared/imported'
+
export const loaderFn = () => {
- return importedLoader();
-};
+ return importedLoader()
+}
+
const Layout = () => {
- return
-
+ return (
+
+
- ;
-};
+
+ )
+}
+
export const Route = createFileRoute('/_layout')({
component: Layout,
- loader: loaderFn
-});
-const HEADER_HEIGHT = '63px';
-export const SIDEBAR_WIDTH = '150px';
-export const SIDEBAR_MINI_WIDTH = '80px';
-const ASIDE_WIDTH = '250px';
-export default Layout;
\ No newline at end of file
+ loader: loaderFn,
+})
+
+const HEADER_HEIGHT = '63px'
+export const SIDEBAR_WIDTH = '150px'
+export const SIDEBAR_MINI_WIDTH = '80px'
+const ASIDE_WIDTH = '250px'
+
+export default Layout
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-function.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-function.tsx
index f608cbe869b..298c388e650 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-function.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/retain-exports-function.tsx
@@ -1,15 +1,18 @@
-console.warn("[tanstack-router] These exports from \"retain-exports-function.tsx\" will not be code-split and will increase your bundle size:\n- Layout\n- loaderFn\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import * as React from 'react';
-import { createFileRoute, Outlet } from '@tanstack/react-router';
-import { importedComponent as ImportedComponent, importedLoader } from '../../shared/imported';
+import * as React from 'react'
+import { createFileRoute, Outlet } from '@tanstack/react-router'
+import {
+ importedComponent as ImportedComponent,
+ importedLoader,
+} from '../../shared/imported'
+
export function loaderFn() {
- return importedLoader();
+ return importedLoader()
}
+
function Layout() {
- return
-
+ return (
+
+
- ;
+
+ )
}
+
export const Route = createFileRoute('/_layout')({
component: Layout,
- loader: loaderFn
-});
-const HEADER_HEIGHT = '63px';
-export const SIDEBAR_WIDTH = '150px';
-export const SIDEBAR_MINI_WIDTH = '80px';
-const ASIDE_WIDTH = '250px';
-export default Layout;
\ No newline at end of file
+ loader: loaderFn,
+})
+
+const HEADER_HEIGHT = '63px'
+export const SIDEBAR_WIDTH = '150px'
+export const SIDEBAR_MINI_WIDTH = '80px'
+const ASIDE_WIDTH = '250px'
+
+export default Layout
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/undefined-literals.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/undefined-literals.tsx
index 1491ba7c3a7..0c6e4f01aa9 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/undefined-literals.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/undefined-literals.tsx
@@ -1,7 +1,8 @@
-import { createFileRoute } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router'
+
export const Route = createFileRoute('/undefined-test')({
component: undefined,
errorComponent: undefined,
pendingComponent: undefined,
- notFoundComponent: undefined
-});
\ No newline at end of file
+ notFoundComponent: undefined,
+})
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/useStateDestructure.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/useStateDestructure.tsx
index 5ca9e1f339e..8f79e69bf03 100644
--- a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/useStateDestructure.tsx
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/useStateDestructure.tsx
@@ -1,121 +1,163 @@
-console.warn("[tanstack-router] These exports from \"useStateDestructure.tsx\" will not be code-split and will increase your bundle size:\n- VersionIndex\nFor the best optimization, these items should either have their export statements removed, or be imported from another location that is not a route file.");
-import * as React from 'react';
-import { CgCornerUpLeft, CgSpinner } from 'react-icons/cg';
-import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaDiscord, FaGithub, FaTshirt, FaTwitter } from 'react-icons/fa';
-import { Await, Link, getRouteApi } from '@tanstack/react-router';
-import { Carbon } from '~/components/Carbon';
-import { Footer } from '~/components/Footer';
-import { VscPreview, VscWand } from 'react-icons/vsc';
-import { TbHeartHandshake } from 'react-icons/tb';
-import SponsorPack from '~/components/SponsorPack';
-import { startProject } from '~/projects/start';
-import { createFileRoute } from '@tanstack/react-router';
-import { Framework, getBranch } from '~/projects';
-import { seo } from '~/utils/seo';
-const menu = [{
- label:
+import * as React from 'react'
+
+import { CgCornerUpLeft, CgSpinner } from 'react-icons/cg'
+import {
+ FaBolt,
+ FaBook,
+ FaCheckCircle,
+ FaCogs,
+ FaDiscord,
+ FaGithub,
+ FaTshirt,
+ FaTwitter,
+} from 'react-icons/fa'
+import { Await, Link, getRouteApi } from '@tanstack/react-router'
+import { Carbon } from '~/components/Carbon'
+import { Footer } from '~/components/Footer'
+import { VscPreview, VscWand } from 'react-icons/vsc'
+import { TbHeartHandshake } from 'react-icons/tb'
+import SponsorPack from '~/components/SponsorPack'
+import { startProject } from '~/projects/start'
+import { createFileRoute } from '@tanstack/react-router'
+import { Framework, getBranch } from '~/projects'
+import { seo } from '~/utils/seo'
+
+const menu = [
+ {
+ label: (
+
Full-document SSR, Streaming, Server Functions, bundling and more,
powered by TanStack Router, Nitro{' '}
and Vite. Ready to deploy to your favorite hosting
@@ -145,12 +187,21 @@ export default function VersionIndex() {
@@ -158,7 +209,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
{/*
+ >
@@ -217,7 +268,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
-
*/}
+
*/}
{/*
@@ -263,7 +314,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
)
})}
-
*/}
+
*/}
{/*
@@ -306,17 +357,19 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
))}
-
*/}
+ */}
Partners
-
+ dark:bg-gray-800 dark:shadow-none"
+ >
Start You?
@@ -326,7 +379,10 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
beyond the call of sponsorship. Are you as invested in TanStack
Start as we are? Let's push the boundaries of Start together!
@@ -355,8 +421,10 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
-
+
This ad helps us be happy about our invested time and not burn out and
rage-quit OSS. Yay money! 😉
@@ -399,7 +467,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
))}
- */}
+ */}
{/* {[''].includes(framework) ? (
@@ -416,7 +484,7 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
and let's get to work!
- ) : (
+ ) : (
- )} */}
+ )} */}
{/*
@@ -451,7 +519,8 @@ Check it out at https://tanstack.com/start/`)}`} target="_blank" className={`fle
Read the Docs!