ui icon indicating copy to clipboard operation
ui copied to clipboard

tailwind.config.ts for typescript project

Open nisabmohd opened this issue 1 year ago • 4 comments

When we create nextapp with typescript then tailwind.config.ts file is generated but when shadcnui is initialised the tailwind.config.js file is produced which is conflicting with ts file

nisabmohd avatar Sep 25 '23 15:09 nisabmohd

You need to mention the tailwind config at the time of initializing shadcn.

image

As mentioned in the image, when you are initializing shadcn, it asks you to locate tailwind config file, thats where you mention the tailwind.config.ts file.

I hope this helps!

bibaswan7 avatar Sep 27 '23 06:09 bibaswan7

@bibaswan7 it works, but It generates a TS file with CommonJS, not ESM.

itsjavi avatar Oct 12 '23 14:10 itsjavi

I ran into this as well. It struggled to generate content in my ESM TS file, it ended up just shoving CJS content into the TS file which removed anything that I had in there.

stramel avatar Nov 03 '23 16:11 stramel

I'm running into the same issue. After initializing shadcn, I'm no longer able to even use tailwind's px/py on non-shadcn components. Any fixes to this yet?

pabloomvc avatar Jan 05 '24 17:01 pabloomvc

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 27 '24 23:02 shadcn