You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce tailwindStylesheet option to replace tailwindEntryPoint (#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 <jonathan@reinink.ca>
* Update README.md
Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
* Update README.md
Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
* Tweak title
---------
Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,20 @@ As of v0.5.x, this plugin now requires Prettier v3 and is ESM-only. This means i
25
25
26
26
## Options
27
27
28
-
### Customizing your Tailwind config path
28
+
### Specifying your Tailwind stylesheet path
29
+
30
+
When using Tailwind CSS v4 you must specify your CSS file entry point, which includes your theme, custom utilities, and other Tailwind configuration options. To do this, use the `tailwindStylesheet` option in your Prettier configuration.
31
+
32
+
Note that paths are resolved relative to the Prettier configuration file.
33
+
34
+
```json5
35
+
// .prettierrc
36
+
{
37
+
"tailwindStylesheet":"./resources/css/app.css"
38
+
}
39
+
```
40
+
41
+
### Specifying your Tailwind JavaScript config path
29
42
30
43
To ensure that the class sorting takes into consideration any of your project's Tailwind customizations, it needs access to your [Tailwind configuration file](https://tailwindcss.com/docs/configuration) (`tailwind.config.js`).
0 commit comments