Skip to content

Conversation

thecrypticace
Copy link
Contributor

We're replacing the existing tailwindEntryPoint option with a tailwindStylesheet option. The existing option is just not well named and the new one feels more correct.

Some notes:

  • The existing option still works it's just deprecated
  • We'll warn when a user is using tailwindEntryPoint and instruct them to use tailwindStylesheet instead
  • You may also specify the path to a CSS file in tailwindConfig and it'll just work in a v4 project. Note: This will also warn users to use tailwindStylesheet but it seems like the principle of least surprise to make it work and instruct users on how to upgrade.

Fixes #318

The old option will still work but the new one is much better named
This is a compatability feature. People previously used the `tailwindConfig` option to specify the location of their config and naturally expect it to work with a CSS file in v4. The preferred option is `tailwindStylesheet` but making this work is rather simple so it should “just work” for improved DX
@thecrypticace thecrypticace force-pushed the feat/v4-stylesheet-option branch from c46a51c to 8ea654c Compare November 18, 2024 19:07
@thecrypticace thecrypticace marked this pull request as ready for review November 18, 2024 19:07
thecrypticace and others added 4 commits November 19, 2024 09:26
Co-authored-by: Jonathan Reinink <[email protected]>
Co-authored-by: Jonathan Reinink <[email protected]>
Co-authored-by: Jonathan Reinink <[email protected]>
@thecrypticace thecrypticace merged commit 26a4754 into main Nov 19, 2024
1 check passed
@thecrypticace thecrypticace deleted the feat/v4-stylesheet-option branch November 19, 2024 15:13
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
…tailwindlabs#330)

* Refactor

* Introduce `tailwindStylesheet` option to replace `tailwindEntryPoint`

The old option will still work but the new one is much better named

* Allow `tailwindConfig` to be used as a stylesheet option

This is a compatability feature. People previously used the `tailwindConfig` option to specify the location of their config and naturally expect it to work with a CSS file in v4. The preferred option is `tailwindStylesheet` but making this work is rather simple so it should “just work” for improved DX

* Warn when using outdated config options

* Update readme

* Bump Tailwind version in tests

* Update option in tests

* Update README.md

Co-authored-by: Jonathan Reinink <[email protected]>

* Update README.md

Co-authored-by: Jonathan Reinink <[email protected]>

* Update README.md

Co-authored-by: Jonathan Reinink <[email protected]>

* Tweak title

---------

Co-authored-by: Jonathan Reinink <[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.

Does not support v4.0.0-alpha.24 with tailwind.css config file

2 participants