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
67.01k stars 3.92k forks source link

Tailwind config file is rewritten #878

Closed yangenmanuel closed 1 week ago

yangenmanuel commented 1 year ago

Im using nextjs 13 with the app router and when I init shadcn it breaks some of my styles.

ShadCN is basically overriding your previous talwind configurations and I need to configurate tailwind again.

The tailwind.config.js should be updated, not rewritten

shamar-morrison commented 1 year ago

+1

I was so surprised the first time it happened. I had to undo the change and manually copy over the edits. I agree it should update the config and not overwrite what's already there.

aashmanVerma commented 1 year ago

@yangenmanuel Yes, or what one can do it init the shadcn at the first step just after creating next app and then you can include more tailwind config in it so that it doesn't override.

buesing commented 1 year ago

This was pretty annoying, I had written a tailwind config and not commited yet, then shadcn overwrote the file without even displaying a warning.

yangenmanuel commented 1 year ago

@yangenmanuel Yes, or what one can do it init the shadcn at the first step just after creating next app and then you can include more tailwind config in it so that it doesn't override.

Thats's an option but, what if in an existing project i want to add shadcn? At least you have to receive a feedback from the CLI saying something like "creating new tailwind config file" or "your tailwind configs will be overrided". The ideal should be an update on the existing file

hiddentao commented 11 months ago

Agree, this just happened to me. Luckily I was able to revert with Git.

adityanithariya commented 6 months ago

Just lost my tailwind config 😭... Please fix this guys, a warning will be sufficient for now!

Nyhz commented 5 months ago

It overwrites both tailwind.config.js and global.css.

Ayesha-Solanki15 commented 5 months ago

How to deal with this issue?

LamnDev commented 4 months ago

any updates here???

adityanithariya commented 4 months ago

How to deal with this issue?

There's a temporary solution, as follows; pass different path to each file which may get overwritten, and then merge all the files manually with changing paths in components.json

NidhiiJ commented 2 months ago

a warning would've been nice

NickWoodward commented 2 months ago

Yup, incredibly annoying tbh

shadcn commented 1 month 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.

adityanithariya commented 1 month ago

Is this fixed?

udbern commented 1 month ago

I don't think so because I just had the same issue yesterday

theishu4 commented 1 month ago

Why were they built in this way? Very annoying😡😡😡

shadcn commented 1 month ago

I'm working on this. No more overriding files.

shadcn commented 1 week 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.