Package Exports
- prettier-plugin-tailwindcss
- prettier-plugin-tailwindcss/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prettier-plugin-tailwindcss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
prettier-plugin-tailwindcss
A Prettier plugin for Tailwind CSS that automatically sorts classes based on Tailwind's internal class sorting algorithm.
Installation
Note that
prettier-plugin-tailwindcss
is only compatible with Tailwind CSS v3
npm install --save-dev prettier prettier-plugin-tailwindcss
By default the plugin will look for a Tailwind config file (tailwind.config.js
) in the same directory as your Prettier config file. If your Tailwind config file is somewhere else you can specify this using the tailwindConfig
option (paths are resolved relative to the Prettier config file):
// prettier.config.js
module.exports = {
tailwindConfig: './styles/tailwind.config.js',
}
If a Tailwind config file cannot be found then the default Tailwind configuration will be used.