Hi guys, setting tailwind in your Vite projects may take two to three steps.
For example in Vite React,
But I have created an npm package that sets up Tailwind with a single command in your project. It will install the Tailwind, generate the config file, and add the templates to it automatically.
Installation:
npm install -g lazywind
Install the package globally.
then run,
lazywind
run this command in your project directory.
Example:
Now let's set up a React Project using Vite
Setup react,
npm create vite@latest client -- --template react cd client npm install
After setting up React and installing the dependencies, you can run the project using:
npm run dev
Set up Tailwind with Lazywind
Hope, you installed lazywind globally, Now run lazywind in your project folder, for example, client is the folder in this case.
It will,
That's it, with just a single command.
Package link: https://www.npmjs.com/package/lazywind
Your Tailwind setup is now complete. Test it out and let me know your feedback - I'd love to hear it!
The above is the detailed content of Setup Tailwind in your Vite Project with this one command. For more information, please follow other related articles on the PHP Chinese website!