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?

3 comments
Comment actions Permalink

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
Comment actions Permalink

It works!

Thank you so much, Elena!

 

 

1
Comment actions Permalink

Great, thanks for letting me know

0

Please sign in to leave a comment.