Get to run the official Tailwind Sorting plugin?

I try to get to run the official Tailwind Sorting plugin (https://tailwindcss.com/blog/automatic-class-sorting-with-prettier)

I use pnpm in a monorepo.

I installed "prettier-plugin-tailwindcss" in the root.

{
"name": "monorepo",
"private": true,
"scripts": {},
"devDependencies": {
"prettier": "latest",
"prettier-plugin-tailwindcss": "^0.1.3"
}
}

 Adjusted Settings:

But it does not seem to sort my Tailwind in my React components.

Any ideas?

0
3 comments

Did you add it to your prettier config? as it's written in https://github.com/tailwindlabs/prettier-plugin-tailwindcss#installation, plugin autoloading is not supported when using pnpm

// prettier.config.js
module.exports = {
  plugins: [require('prettier-plugin-tailwindcss')],
}

nnn

0

It works!

Thank you so much, Elena!

 

 

1

Great, thanks for letting me know

0

Please sign in to leave a comment.