From 191263dc6d38634161c946b73774d17ec3802880 Mon Sep 17 00:00:00 2001 From: Wellington Date: Fri, 15 Nov 2024 12:09:42 -0300 Subject: [PATCH] feat: add documentation section for vite setup --- src/pages/docs/guides/vite.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/pages/docs/guides/vite.js b/src/pages/docs/guides/vite.js index 5867a68c2..15a6390b7 100644 --- a/src/pages/docs/guides/vite.js +++ b/src/pages/docs/guides/vite.js @@ -62,6 +62,26 @@ let tabs = [ }`, }, }, + { + title: 'Add css section to vite config', + body: () =>

Add the config needed for vite to use Tailwindcss in the vite.config.js.

, + code: { + name: 'vite.config.js', + lang: 'ts', + code: ` import { defineConfig } from "vite"; + import react from "@vitejs/plugin-react-swc"; +> import tailwindcss from "tailwindcss"; + + export default defineConfig({ + plugins: [react()], +> css: { +> postcss: { +> plugins: [tailwindcss()], +> }, +> }, + })`, + }, + }, { title: 'Add the Tailwind directives to your CSS', body: () => (