Skip to content

How could you generate multiple CSS files at once? #6612

Answered by adamwathan
KTibow asked this question in Help
Discussion options

You must be logged in to vote

This all kind of depends what you are actually trying to even do here.

  1. You want to compile multiple input files into multiple output files, all with their own tailwind.config.js configuration. In this case your best bet is to just run Tailwind multiple times with different arguments. You can use a package like npm-run-all or concurrently to bundle this all up into one script.

  2. You want to compile multiple input files into a single output file. What you probably want here is to actually just compile a single file, but use postcss-import to import all of your individual files into one file before processing it with Tailwind. Here's some documentation on that: https://tailwindcss.com/docs…

Replies: 6 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@KTibow
Comment options

Answer selected by KTibow
Comment options

You must be logged in to vote
2 replies
@jamesarosen
Comment options

@KTibow
Comment options

Comment options

You must be logged in to vote
3 replies
@KTibow
Comment options

@deadcoder0904
Comment options

@yuuk
Comment options

Comment options

You must be logged in to vote
2 replies
@adamwathan
Comment options

@dy
Comment options

Comment options

You must be logged in to vote
2 replies
@vishal-g
Comment options

@vishal-g
Comment options

# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Help
Labels
None yet
7 participants