Closed spock123 closed 2 years ago
I suspect the culprit is the purge option which should only be enabled for production builds.
Can you try to disable that and see if the problem persists? If the problem persists, we’d need a reproduction to investigate the issue.
Hi @alan-agius4 , thank you for your quick response.
As far as I understand, TailWind will only purge when NODE_ENV = production, which is not the case in dev mode.
I've also tried to deactivate purge altogether, but it doesn't seem to affect the issue.
In that case a reproduction would be needed to determine what is the problem and if it's caused by the Angular CLI or TailwindCSS.
A good way to make a minimal repro is to create a new app via ng new repro-app
and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
Thank you @alan-agius4 , I'll try to work on it and see what I can come up with. Thanks again.
A few observations so far:
Can you provide a CPU profile of the build please?
@alan-agius4 I'm out now but I'll try later. Sorry :) thank you
@alan-agius4 I think my mystery is solved. For some reason, in Angular.json, I had
"optimization": true,
"buildOptimizer": true
Turning those off helped immensely
Glad that you found the issue 😀
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
🐞 Bug report
Hi, I know this has been reported before, but those issues were closed due to inactivity. But the issue still persists:
Description
Adding Tailwind to Angular makes development builds extremely slow. Our project went from < 1 sec to >15 secs on each change.
Tried lots of things ,but nothing has worked so far. I unfortunately cannot share our project.
🌍 Your Environment
Anything else relevant?
Tailwind config:
Dependencies: