diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60aeaaf..5f1dd02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -376,6 +376,15 @@ importers: '@vitejs/plugin-react': specifier: ^4.3.3 version: 4.3.3(vite@6.0.0-beta.6(@types/node@22.9.1)(jiti@2.4.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)) + autoprefixer: + specifier: ^10.4.20 + version: 10.4.20(postcss@8.4.49) + postcss: + specifier: ^8.4.49 + version: 8.4.49 + tailwindcss: + specifier: ^3.4.15 + version: 3.4.15(ts-node@10.9.1(@types/node@22.9.1)(typescript@5.6.3)) typescript: specifier: ^5.6.3 version: 5.6.3 diff --git a/tanstack-start/app/routes/__root.tsx b/tanstack-start/app/routes/__root.tsx index 42e8645..32a3102 100644 --- a/tanstack-start/app/routes/__root.tsx +++ b/tanstack-start/app/routes/__root.tsx @@ -2,6 +2,7 @@ import {createRootRoute, Outlet, ScrollRestoration} from '@tanstack/react-router import {TanStackRouterDevtools} from '@tanstack/router-devtools' import {Meta, Scripts} from '@tanstack/start' import type {ReactNode} from 'react' +import appCss from '../styles/app.css?url' export const Route = createRootRoute({ head: () => ({ @@ -16,11 +17,10 @@ export const Route = createRootRoute({ { title: 'TanStack Start Starter', }, - { - rel: 'icon', - type: 'image/png', - href: '/favicon.png', - }, + ], + links: [ + {rel: 'stylesheet', href: appCss}, + {rel: 'icon', type: 'image/png', href: '/favicon.png'}, ], }), component: RootComponent, diff --git a/tanstack-start/app/styles/app.css b/tanstack-start/app/styles/app.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/tanstack-start/app/styles/app.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/tanstack-start/package.json b/tanstack-start/package.json index bd32d68..8afdc6d 100644 --- a/tanstack-start/package.json +++ b/tanstack-start/package.json @@ -21,6 +21,9 @@ "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.3", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.15", "typescript": "^5.6.3" } } diff --git a/tanstack-start/postcss.config.cjs b/tanstack-start/postcss.config.cjs new file mode 100644 index 0000000..4193e8a --- /dev/null +++ b/tanstack-start/postcss.config.cjs @@ -0,0 +1,3 @@ +module.exports = { + plugins: [require('tailwindcss'), require('autoprefixer')], +} diff --git a/tanstack-start/tailwind.config.cjs b/tanstack-start/tailwind.config.cjs new file mode 100644 index 0000000..75fe25d --- /dev/null +++ b/tanstack-start/tailwind.config.cjs @@ -0,0 +1,4 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ['./app/**/*.{js,ts,jsx,tsx}'], +}