diff --git a/examples/react-cra/resume-starter/.gitignore b/examples/react-cra/resume-starter/.gitignore index e78e40a8..1b3c3283 100644 --- a/examples/react-cra/resume-starter/.gitignore +++ b/examples/react-cra/resume-starter/.gitignore @@ -4,5 +4,4 @@ dist dist-ssr *.local .output -.vinxi .content-collections \ No newline at end of file diff --git a/examples/react-cra/resume-starter/app.config.ts b/examples/react-cra/resume-starter/app.config.ts index 69986467..50b245f2 100644 --- a/examples/react-cra/resume-starter/app.config.ts +++ b/examples/react-cra/resume-starter/app.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from "@tanstack/react-start/config"; -import contentCollections from "@content-collections/vinxi"; +import { defineConfig } from "@tanstack/start/config"; +import contentCollections from "@content-collections/vite"; import viteTsConfigPaths from "vite-tsconfig-paths"; import tailwindcss from "@tailwindcss/vite"; diff --git a/examples/react-cra/resume-starter/index.html b/examples/react-cra/resume-starter/index.html new file mode 100644 index 00000000..7e04ef60 --- /dev/null +++ b/examples/react-cra/resume-starter/index.html @@ -0,0 +1,12 @@ + + + + + + Resume Starter + + +
+ + + diff --git a/examples/react-cra/resume-starter/package.json b/examples/react-cra/resume-starter/package.json index debc1d63..1ba2f688 100644 --- a/examples/react-cra/resume-starter/package.json +++ b/examples/react-cra/resume-starter/package.json @@ -3,9 +3,9 @@ "private": true, "type": "module", "scripts": { - "dev": "vinxi dev", - "start": "vinxi start", - "build": "vinxi build", + "dev": "vite", + "start": "vite", + "build": "vite build", "serve": "vite preview", "test": "vitest run" }, @@ -29,12 +29,13 @@ "tailwind-merge": "^3.0.2", "tailwindcss": "^4.0.6", "tailwindcss-animate": "^1.0.7", - "vinxi": "^0.5.3", "vite-tsconfig-paths": "^5.1.4" }, "devDependencies": { "@content-collections/core": "^0.8.2", - "@content-collections/vinxi": "^0.1.0", + "@content-collections/vite": "^0.2.6", + "@tanstack/router-generator": "1.120.20", + "@tanstack/start": "^1.120.20", "@testing-library/dom": "^10.4.0", "@testing-library/react": "^16.2.0", "@types/react": "^19.0.8", diff --git a/examples/react-cra/resume-starter/src/main.tsx b/examples/react-cra/resume-starter/src/main.tsx new file mode 100644 index 00000000..255511cb --- /dev/null +++ b/examples/react-cra/resume-starter/src/main.tsx @@ -0,0 +1,8 @@ +import ReactDOM from 'react-dom/client' +import { RouterProvider } from '@tanstack/react-router' +import { createRouter } from './router' + +const router = createRouter() + +const rootEl = document.getElementById('root')! +ReactDOM.createRoot(rootEl).render() diff --git a/examples/react-cra/resume-starter/src/routeTree.gen.ts b/examples/react-cra/resume-starter/src/routeTree.gen.ts index 5e682936..d204c269 100644 --- a/examples/react-cra/resume-starter/src/routeTree.gen.ts +++ b/examples/react-cra/resume-starter/src/routeTree.gen.ts @@ -8,48 +8,25 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -// Import Routes +import { Route as rootRouteImport } from './routes/__root' +import { Route as IndexRouteImport } from './routes/index' -import { Route as rootRoute } from './routes/__root' -import { Route as IndexImport } from './routes/index' - -// Create/Update Routes - -const IndexRoute = IndexImport.update({ +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => rootRoute, + getParentRoute: () => rootRouteImport, } 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 interface FileRoutesByFullPath { '/': typeof IndexRoute } - export interface FileRoutesByTo { '/': typeof IndexRoute } - export interface FileRoutesById { - __root__: typeof rootRoute + __root__: typeof rootRouteImport '/': typeof IndexRoute } - export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath fullPaths: '/' @@ -58,31 +35,25 @@ export interface FileRouteTypes { id: '__root__' | '/' fileRoutesById: FileRoutesById } - export interface RootRouteChildren { IndexRoute: typeof IndexRoute } +declare module '@tanstack/react-router' { + interface FileRoutesByPath { + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + } +} + const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, } - -export const routeTree = rootRoute +export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() - -/* ROUTE_MANIFEST_START -{ - "routes": { - "__root__": { - "filePath": "__root.tsx", - "children": [ - "/" - ] - }, - "/": { - "filePath": "index.tsx" - } - } -} -ROUTE_MANIFEST_END */ diff --git a/examples/react-cra/resume-starter/src/routes/__root.tsx b/examples/react-cra/resume-starter/src/routes/__root.tsx index fd3b5bd8..e30de3b9 100644 --- a/examples/react-cra/resume-starter/src/routes/__root.tsx +++ b/examples/react-cra/resume-starter/src/routes/__root.tsx @@ -40,14 +40,10 @@ export const Route = createRootRoute({ function RootDocument({ children }: { children: React.ReactNode }) { return ( - - - - - - {children} - - - + <> + + {children} + + ); } diff --git a/examples/react-cra/resume-starter/starter-info.json b/examples/react-cra/resume-starter/starter-info.json index d549b124..f673da1c 100644 --- a/examples/react-cra/resume-starter/starter-info.json +++ b/examples/react-cra/resume-starter/starter-info.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@content-collections/core": "^0.8.2", - "@content-collections/vinxi": "^0.1.0" + "@content-collections/vite": "^0.2.6" } }, "dependsOn": ["start", "shadcn"], diff --git a/examples/react-cra/resume-starter/starter.json b/examples/react-cra/resume-starter/starter.json index dd5932ea..af5e086c 100644 --- a/examples/react-cra/resume-starter/starter.json +++ b/examples/react-cra/resume-starter/starter.json @@ -23,15 +23,15 @@ }, "devDependencies": { "@content-collections/core": "^0.8.2", - "@content-collections/vinxi": "^0.1.0" + "@content-collections/vite": "^0.2.6" } }, "dependsOn": ["start", "shadcn"], "typescript": true, "tailwind": true, "files": { - "./.gitignore": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n.output\n.vinxi\n.content-collections", - "./app.config.ts": "import { defineConfig } from \"@tanstack/react-start/config\";\nimport contentCollections from \"@content-collections/vinxi\";\nimport viteTsConfigPaths from \"vite-tsconfig-paths\";\nimport tailwindcss from \"@tailwindcss/vite\";\n\nconst config = defineConfig({\n tsr: {\n appDirectory: \"src\",\n },\n vite: {\n plugins: [\n contentCollections(),\n viteTsConfigPaths({\n projects: [\"./tsconfig.json\"],\n }),\n tailwindcss(),\n ],\n },\n});\n\nexport default config;\n", + "./.gitignore": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n.output\n.content-collections", + "./app.config.ts": "import { defineConfig } from \"@tanstack/start/config\";\nimport contentCollections from \"@content-collections/vite\";\nimport viteTsConfigPaths from \"vite-tsconfig-paths\";\nimport tailwindcss from \"@tailwindcss/vite\";\n\nconst config = defineConfig({\n tsr: {\n appDirectory: \"src\",\n },\n vite: {\n plugins: [\n contentCollections(),\n viteTsConfigPaths({\n projects: [\"./tsconfig.json\"],\n }),\n tailwindcss(),\n ],\n },\n});\n\nexport default config;\n", "./content/education/code-school.md": "---\nschool: Code School\nsummary: Full Stack Development\nstartDate: 2020-01-01\nendDate: 2020-12-31\ntags:\n [\n \"Full Stack Development\",\n \"JavaScript\",\n \"React\",\n \"Node.js\",\n \"Express\",\n \"MongoDB\",\n ]\n---\n\nCompleted a comprehensive full stack development course covering JavaScript, React, Node.js, Express, and MongoDB. Gained hands-on experience with modern web development frameworks and databases while building a full stack application.\n", "./content/jobs/freelance.md": "---\njobTitle: Frontend Development Consultant\ncompany: Freelance\nlocation: Remote\nstartDate: 2020-01-01\nendDate: 2020-12-31\nsummary: Independent frontend development consultant working with multiple clients on web applications and sites\ndescription:\ntags:\n [\"React\", \"TypeScript\", \"Frontend Development\", \"JavaScript\", \"CSS\", \"HTML\"]\n---\n\nProvided expert frontend development services to various clients, specializing in React, TypeScript, and modern web technologies. Delivered responsive and performant web applications while maintaining high code quality and best practices.\n", "./content/jobs/initech-junior.md": "---\njobTitle: Junior Frontend Developer\ncompany: IniTech\nlocation: Remote\nstartDate: 2021-01-01\nendDate: 2021-12-31\nsummary: Junior frontend developer working on React-based web applications using modern development practices\ndescription:\ntags:\n [\n \"React\",\n \"TypeScript\",\n \"Frontend Development\",\n \"JavaScript\",\n \"TanStack\",\n \"Web Development\",\n ]\n---\n\nWorked as a junior frontend developer at IniTech, contributing to React-based web applications. Collaborated with the development team to implement responsive user interfaces, integrate REST APIs, and maintain code quality. Gained hands-on experience with modern frontend technologies and development workflows while working on production applications.\n", diff --git a/examples/react-cra/resume-starter/vite.config.ts b/examples/react-cra/resume-starter/vite.config.ts new file mode 100644 index 00000000..c4c3e68d --- /dev/null +++ b/examples/react-cra/resume-starter/vite.config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import tsconfigPaths from 'vite-tsconfig-paths' +import { tanstackRouter } from '@tanstack/router-plugin/vite' +import contentCollections from '@content-collections/vite' +import tailwindcss from '@tailwindcss/vite' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + // Router plugin should come before react + tanstackRouter(), + react(), + tsconfigPaths(), + contentCollections(), + tailwindcss(), + ], +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e18cfca..c47bb00b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -573,18 +573,10 @@ packages: resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.27.1': resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} @@ -626,10 +618,6 @@ packages: resolution: {integrity: sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==} engines: {node: '>=6.9.0'} - '@babel/types@7.27.0': - resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} - engines: {node: '>=6.9.0'} - '@babel/types@7.28.2': resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} @@ -5121,7 +5109,7 @@ snapshots: '@babel/code-frame@7.26.2': dependencies: - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 js-tokens: 4.0.0 picocolors: 1.1.1 @@ -5138,7 +5126,7 @@ snapshots: '@babel/parser': 7.27.0 '@babel/template': 7.27.0 '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 convert-source-map: 2.0.0 debug: 4.4.0 gensync: 1.0.0-beta.2 @@ -5150,7 +5138,7 @@ snapshots: '@babel/generator@7.27.0': dependencies: '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@jridgewell/gen-mapping': 0.3.12 '@jridgewell/trace-mapping': 0.3.29 jsesc: 3.1.0 @@ -5166,7 +5154,7 @@ snapshots: '@babel/helper-module-imports@7.25.9': dependencies: '@babel/traverse': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 transitivePeerDependencies: - supports-color @@ -5174,19 +5162,15 @@ snapshots: dependencies: '@babel/core': 7.26.10 '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 '@babel/traverse': 7.27.0 transitivePeerDependencies: - supports-color '@babel/helper-plugin-utils@7.26.5': {} - '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.25.9': {} - '@babel/helper-validator-identifier@7.27.1': {} '@babel/helper-validator-option@7.25.9': {} @@ -5194,7 +5178,7 @@ snapshots: '@babel/helpers@7.27.0': dependencies: '@babel/template': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@babel/parser@7.27.0': dependencies: @@ -5218,7 +5202,7 @@ snapshots: dependencies: '@babel/code-frame': 7.26.2 '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@babel/traverse@7.27.0': dependencies: @@ -5226,17 +5210,12 @@ snapshots: '@babel/generator': 7.27.0 '@babel/parser': 7.27.0 '@babel/template': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.27.0': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/types@7.28.2': dependencies: '@babel/helper-string-parser': 7.27.1 @@ -6622,23 +6601,23 @@ snapshots: '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@types/babel__generator': 7.27.0 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.7 '@types/babel__generator@7.27.0': dependencies: - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@types/babel__traverse@7.20.7': dependencies: - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 '@types/body-parser@1.19.5': dependencies: @@ -8442,7 +8421,7 @@ snapshots: magicast@0.3.5: dependencies: '@babel/parser': 7.27.0 - '@babel/types': 7.27.0 + '@babel/types': 7.28.2 source-map-js: 1.2.1 make-dir@4.0.0: