tailwindlabs / tailwindcss.com

The Tailwind CSS documentation website.
https://tailwindcss.com
3.25k stars 1.72k forks source link

I would like to contribute a Vite setup configuration necessary for using Tailwind CSS with Vite in the documentation. This configuration helps users set up Tailwind CSS efficiently in their Vite projects. #1839

Closed Nenepo closed 2 months ago

Nenepo commented 2 months ago

Here is the Vite configuration I propose adding to the documentation:

import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import tailwindcss from 'tailwindcss';

export default defineConfig({ plugins: [react()], css: { postcss: { plugins: [tailwindcss()], }, }, });

thecrypticace commented 2 months ago

Hi! We already have a Vite guide on our site. The difference is that it creates a postcss config file by using the -p flag when calling init: https://tailwindcss.com/docs/guides/vite

Nenepo commented 2 months ago

That’s understandable but without importing taikwind in the vite.config file it never worked

On Mon, 15 Jul 2024 at 1:46 PM, Jordan Pittman @.***> wrote:

Hi! We already have a Vite guide on our site. The difference is that it creates a postcss config file by using the -p flag when calling init: https://tailwindcss.com/docs/guides/vite

— Reply to this email directly, view it on GitHub https://github.com/tailwindlabs/tailwindcss.com/issues/1839#issuecomment-2228423816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXPFC77PCZUIULUA4JIUVG3ZMPADZAVCNFSM6AAAAABK2NZAX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRYGQZDGOBRGY . You are receiving this because you authored the thread.Message ID: @.***>

thecrypticace commented 2 months ago

Can you provide a reproduction of a project where it does not work?

Nenepo commented 1 month ago

yes i can, but how do i show you? should I send a repo link after?

On Mon, Jul 15, 2024 at 4:16 PM Jordan Pittman @.***> wrote:

Can you provide a reproduction of a project where it does not work?

— Reply to this email directly, view it on GitHub https://github.com/tailwindlabs/tailwindcss.com/issues/1839#issuecomment-2228752413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXPFC76OQCC2QFZDO3X3HT3ZMPRVZAVCNFSM6AAAAABK2NZAX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRYG42TENBRGM . You are receiving this because you authored the thread.Message ID: @.***>