Skip to content

Conversation

@danielkov
Copy link
Contributor

Context

What changed?

  • Updated examples/tailwind to use V4 Tailwind CSS CLI
    • Removed tailwind.config.js as it is unnecessary for V4 with a minimal setup
    • Updated outdated utility classes
  • Updated example-projects/ecommerce-site to use V4 Tailwind CSS CLI

See also

Copy link
Member

@jkelleyrtp jkelleyrtp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I see several package.json and package-lock.json files being generated....

I believe we don't need those - the tailwind CLI should be able to work without it.

Do you mind removing those and/or updating any docs to match?

@danielkov
Copy link
Contributor Author

Hi @jkelleyrtp 👋

Thank you for the review!

the tailwind CLI should be able to work without it

That has not been my experience. I had to run npm install with at minimum this package.json file present, before running npx @tailwindcss/cli -i ./input.css -o ./assets/tailwind.css, otherwise I got something along the lines of:

module "tailwindcss" not found

Do you mind sharing your setup / steps, just so I can confirm and update accordingly? 🙏

@jlowry
Copy link

jlowry commented Apr 29, 2025

Do you mind sharing your setup / steps, just so I can confirm and update accordingly? 🙏

I've tested it and can confirm the The Tailwind CSS Standalone CLI does not need a package.json. See https://tailwindcss.com/blog/standalone-cli

@ealmloff
Copy link
Member

It depends how you install the tailwind CLI. If you run the CLI via npx which is the default in the tailwind docs then the new version does get installed in your node modules. If you use the standalone CLI, it does not.

The other two PRs that update tailwind (DioxusLabs/dioxus-template#68 and DioxusLabs/docsite#473) both use the npx CLI

@jkelleyrtp jkelleyrtp merged commit 4276b9b into DioxusLabs:main May 30, 2025
AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jun 2, 2025
* feat: update examples to tailwind v4

---------

Co-authored-by: Jonathan Kelley <[email protected]>
AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jul 23, 2025
* feat: update examples to tailwind v4

---------

Co-authored-by: Jonathan Kelley <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants