2

I am pretty new to Tailwind and CSS as a whole and am trying to build this CSS file:

@tailwind base;
@tailwind components;
@tailwind utilities;

.btn{
    @apply rounded-full py-2 px-3 uppercase text-xs font-bold cursor-pointer tracking-wider
}

With this command

npm run build-css

But I get this response

> [email protected] build-css C:\Users\user\Tailwind\project
> tailwindcss build src/styles.css -o public/styles.css

[deprecation] Running tailwindcss without -i, please provide an input file.

Done in 3220ms.

And nothing happens. How do I specify the input file?

2 Answers 2

5

As error says, you need to provide input file with -i flag. Change your script inside package.json to this

tailwindcss -i src/styles.css -o public/styles.css

More information about Tailwind CLI is here

Sign up to request clarification or add additional context in comments.

Comments

0

You can try the below command,

npx tailwindcss -i ./src/tailwind.css -o ./dist/tailwind.css

Where the file after -i is your source css file where you have extracted the custom css components and -o is where you want your final build file.

For more, have a look at the link in tailwindcss website - Using Tailwind CLI

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.