Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 opened this issue Jul 13, 2024 · 4 comments

Comments

@Nenepo
Copy link

Nenepo commented Jul 13, 2024

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
Copy link
Contributor

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
Copy link
Author

Nenepo commented Jul 15, 2024 via email

@thecrypticace
Copy link
Contributor

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

@Nenepo
Copy link
Author

Nenepo commented Jul 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants