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
This plugin follows the Prettier autoloading convention, so once it's installed it should automatically start working.
13
+
This plugin follows Prettier’s autoloading convention, so as long as you’ve got Prettier set up in your project, it’ll start working automatically as soon as it’s installed.
16
14
17
15
## Resolving your Tailwind configuration
18
16
@@ -33,6 +31,10 @@ If a local configuration file cannot be found the plugin will fallback to the de
33
31
34
32
## Compatibility with other Prettier plugins
35
33
36
-
To make this plugin work we had to build it in a way that the Prettier plugin system was not originally designed for. We had to extend the core parsers in Prettier with our own custom parsers. And while this totally works, it makes this plugin incompatible with other Prettier plugins that are built the same way.
34
+
To make this plugin work we had to use private Prettier APIs that can only be used by a single plugin at once. This means this plugin is incompatible with other Prettier plugins that are using the same APIs.
35
+
36
+
The most popular example we know of is [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte), which can't be installed at the same time as the Tailwind CSS plugin.
37
+
38
+
To work around this, we've bundled `prettier-plugin-svelte` directly into `prettier-plugin-tailwindcss`, so if you'd like to use this plugin with Svelte, just uninstall `prettier-plugin-svelte` and everything should work as expected.
37
39
38
-
One example of this incompatibility is with the [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte) plugin. It's not possible to use the Svelte plugin at the same time as the Tailwind CSS plugin. However, as a workaround for this specific situation, we've bundled the Svelte plugin into our plugin. Simply remove `prettier-plugin-svelte` from your Svelte project when installing the `prettier-plugin-tailwindcss` plugin, and everything should continue working.
40
+
If you discover any other incompatibilities, open an issue and hopefully we can figure out a way to make it work.
0 commit comments