tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

Limit tailwind postcss plugin to single run #221

Open jpscharf opened 5 years ago

jpscharf commented 5 years ago

Description:

When using tailwind with postCss, it is ran multiple times. At least twice, and then once for any vue component that have styles. I have a plugin that generates a lot of classes. When I run npm run dev it takes ≈ 7 minutes!

Steps To Reproduce:

  1. Get the test repo (new install of laravel, mix and tailwind): git clone git@github.com:jpscharf/tailwind-mix-example.git
  2. Install dependencies: composer install and npm install
  3. Build npm run dev

JeffreyWay/laravel-mix#1966

adamwathan commented 5 years ago

Nothing we can really do about this on our end, this is just how most build systems are designed to run. The same things happens out of the box with vue-cli for example too — all component style blocks are processed completely independently instead of concatenating all of the CSS and processing it together.