installing and configuring tailwind

This commit is contained in:
lila 2026-03-21 20:59:26 +01:00
parent 9ebbf83f93
commit 681c6d2b4f
5 changed files with 8 additions and 2 deletions

View file

@ -10,10 +10,12 @@
}, },
"dependencies": { "dependencies": {
"@glossa/shared": "workspace:*", "@glossa/shared": "workspace:*",
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.168.1", "@tanstack/react-router": "^1.168.1",
"@tanstack/react-router-devtools": "^1.166.10", "@tanstack/react-router-devtools": "^1.166.10",
"react": "^19.2.4", "react": "^19.2.4",
"react-dom": "^19.2.4" "react-dom": "^19.2.4",
"tailwindcss": "^4.2.2"
}, },
"devDependencies": { "devDependencies": {
"@tanstack/router-plugin": "^1.167.2", "@tanstack/router-plugin": "^1.167.2",

View file

@ -0,0 +1 @@
@import "tailwindcss";

View file

@ -1,6 +1,7 @@
import { StrictMode } from "react"; import { StrictMode } from "react";
import ReactDOM from "react-dom/client"; import ReactDOM from "react-dom/client";
import { RouterProvider, createRouter } from "@tanstack/react-router"; import { RouterProvider, createRouter } from "@tanstack/react-router";
import "./index.css";
// Import the generated route tree // Import the generated route tree
import { routeTree } from "./routeTree.gen"; import { routeTree } from "./routeTree.gen";

View file

@ -4,7 +4,7 @@ export const Route = createFileRoute("/")({ component: Index });
function Index() { function Index() {
return ( return (
<div className="p-2"> <div className="p-2 text-3xl text-amber-400">
<h3>Welcome Home!</h3> <h3>Welcome Home!</h3>
</div> </div>
); );

View file

@ -1,11 +1,13 @@
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import react from "@vitejs/plugin-react"; import react from "@vitejs/plugin-react";
import { tanstackRouter } from "@tanstack/router-plugin/vite"; import { tanstackRouter } from "@tanstack/router-plugin/vite";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
tanstackRouter({ target: "react", autoCodeSplitting: true }), tanstackRouter({ target: "react", autoCodeSplitting: true }),
react(), react(),
tailwindcss(),
], ],
}); });