I created a React application using Vite and used the documentation provided here to install Tailwind: Tailwind CSS Installation Guide.
However, it's not picking up any of the Tailwind styles.
tailwind.config.cjs
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
main.tsx
import React from "react";
import ReactDOM from "react-dom/client";
import { RouterProvider } from "react-router-dom";
import { router } from "./router";
import "./index.css";
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);
The only dependency I have installed is react-router-dom
.
How can I fix this?