Skip to content

feat: update resume starter to vite #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/react-cra/resume-starter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ dist
dist-ssr
*.local
.output
.vinxi
.content-collections
4 changes: 2 additions & 2 deletions examples/react-cra/resume-starter/app.config.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
12 changes: 12 additions & 0 deletions examples/react-cra/resume-starter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Resume Starter</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
11 changes: 6 additions & 5 deletions examples/react-cra/resume-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions examples/react-cra/resume-starter/src/main.tsx
Original file line number Diff line number Diff line change
@@ -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(<RouterProvider router={router} />)
65 changes: 18 additions & 47 deletions examples/react-cra/resume-starter/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/'
Expand All @@ -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<FileRouteTypes>()

/* ROUTE_MANIFEST_START
{
"routes": {
"__root__": {
"filePath": "__root.tsx",
"children": [
"/"
]
},
"/": {
"filePath": "index.tsx"
}
}
}
ROUTE_MANIFEST_END */
14 changes: 5 additions & 9 deletions examples/react-cra/resume-starter/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,10 @@ export const Route = createRootRoute({

function RootDocument({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<HeadContent />
</head>
<body>
{children}
<Scripts />
</body>
</html>
<>
<HeadContent />
{children}
<Scripts />
</>
);
}
2 changes: 1 addition & 1 deletion examples/react-cra/resume-starter/starter-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
6 changes: 3 additions & 3 deletions examples/react-cra/resume-starter/starter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions examples/react-cra/resume-starter/vite.config.ts
Original file line number Diff line number Diff line change
@@ -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(),
],
})
47 changes: 13 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.