Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code generated with use tailwind from the CLI #15223

Closed
dei8bit opened this issue Feb 5, 2025 · 1 comment
Closed

Update code generated with use tailwind from the CLI #15223

dei8bit opened this issue Feb 5, 2025 · 1 comment

Comments

@dei8bit
Copy link

dei8bit commented Feb 5, 2025

Describe the problem

Currently When you start a sveltekit project from the CLI and check the option to add tailwind...

| [+] tailwindcss (css framework - https://tailwindcss.com)

  • it installs "tailwindcss": "^3.4.17"
  • generate a postcss.config.js file
  • generate a tailwind.config.js file
  • puts unnecessary imports in the app.css file

Tailwind 4 version is available, works and does not require post CSS

what needs to be changed is not much but would be better.

Describe the proposed solution

In order to update the current setup up to the new setup:

  • upgade ↑ tailwindcss 3.4.17 → 4.0.3
  • add @tailwindcss/vite -d
  • remove postcss.config.js file.
  • remove tailwind.config.ts file.
  • import tailwindcss from '@tailwindcss/vite' ; in vite.config.ts
  • add tailwindcss() in plugins ; in vite.config.ts
  • update de app.css file:
- @import 'tailwindcss/base';
-@import 'tailwindcss/components';
-@import 'tailwindcss/utilities'
+@import "tailwindcss";

that's all :)

Importance

would make my life easier

@dei8bit
Copy link
Author

dei8bit commented Feb 6, 2025

aa :( my issue was better writed that the original

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants