shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
62.84k stars 3.53k forks source link

tailwind.config.ts for typescript project #1594

Closed nisabmohd closed 4 months ago

nisabmohd commented 9 months ago

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

bibaswan7 commented 9 months ago

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!

itsjavi commented 8 months ago

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

stramel commented 8 months ago

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.

pabloomvc commented 5 months ago

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?

shadcn commented 4 months ago

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.