Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anticipating Slow Compile Times #34

Closed
earnold opened this issue Feb 6, 2021 · 1 comment
Closed

Anticipating Slow Compile Times #34

earnold opened this issue Feb 6, 2021 · 1 comment

Comments

@earnold
Copy link

earnold commented Feb 6, 2021

Hi there!

Very excited to see this package. Adding tailwind to a new rails project is one of the first things I do.

Locally, I've noticed that that a trivial change to application.js (or one of its dependencies) results in slow compile times:

[Webpacker] Compiling...
[Webpacker] Compiled all packs in /Users/evan/Projects/scratch-pad/TailwindTester/public/packs
[Webpacker] Hash: b937b4359523d601173a
Version: webpack 4.46.0
Time: 5188ms

This is on an M1 MBP.

This is a known issue for the interaction of postcss, web pack, and tailwind 2. While there are a few proposed work arounds on that issue, nothing seems super satisfactory.

Do you have any plans for addressing this? If so, I'd love to help in anyway. Right now I'm scratching my head on how to address it.

@dhh
Copy link
Member

dhh commented Feb 6, 2021

You can use the webpack dev server. I believe that'll be faster. But otherwise, no. Not within the scope of what this gem is capable of doing.

The asset path version doesn't suffer from this (because there's no JS compile times!), but that's of course a larger change to make.

@dhh dhh closed this as completed Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants