Skip to content

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Jan 3, 2022

This env var only now exists as a workaround for older postcss-loader versions that don't support build dependencies. It is not necessary when using postcss-loader >= 5.3. Additionally it does not work with polling. This shows itself when running docker containers on Windows which require angular to poll for changes because filesystem events from volumes are not delivered to the container.

Internally we use postcss dependencies and rely on the build tool running tailwind to track file changes for us. Using TAILWIND_MODE=watch sidesteps that entirely and causes tailwind to watch files for changes itself. We only use this as a workaround for when tools aren't behaving properly.

The relevant issue on tailwindcss is here: tailwindlabs/tailwindcss#6343

Relevant PostCSS discussion: postcss/postcss#1537

This was only used as a workaround for older postcss-loder versions. It is no longer necessary. Additionaly it does not work with polling.
@thecrypticace thecrypticace force-pushed the fix/no-tailwind-mode-watch branch from 9e72bac to 70dfcda Compare January 3, 2022 16:19
@adamwathan
Copy link

Creator of Tailwind here — co-signed, this isn't necessary and only introduces problems. TAILWIND_MODE=watch is hacky and not very robust and will eventually be removed from Tailwind, was a stop-gap until the ecosystem updated to support dir-dependency messages, which is has now 👍🏻

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed action: merge The PR is ready for merge by the caretaker labels Jan 10, 2022
@dgp1130 dgp1130 merged commit 509322b into angular:master Jan 10, 2022
@dgp1130
Copy link
Collaborator

dgp1130 commented Jan 10, 2022

@alan-agius4, do we also want this in patch? Seems like it could be shipped before 13.2?

@adamwathan
Copy link

Just a quick follow-up, we've already removed this from Tailwind in recent releases (removed in 3.0.9 and we're on 3.0.12 now), so the code this PR removes is already just doing nothing for anyone who is on the latest Tailwind 👍🏻

@sasafister
Copy link

Any updates on this? I still can't have this working. I have to rerun ng serve everytime I add a class that is not added before.

@dgp1130
Copy link
Collaborator

dgp1130 commented Jan 26, 2022

This will go out in 13.2 which is scheduled in less than 24 hours, so it should be fixed shortly.

@sasafister
Copy link

This will go out in 13.2 which is scheduled in less than 24 hours, so it should be fixed shortly.

A, okay. I will try that later ... Btw, fix doesn't seems to work either :/

@alk841
Copy link

alk841 commented Jan 27, 2022

update to angular 13.2. not fix this problem :(

@alk841
Copy link

alk841 commented Jan 27, 2022

Problem is solved. I need manualy uninstall and install devDependencies "@angular-devkit/build-angular": "^13.2.0",
now tailwindcss v3.0.17 JIT works :)

@sasafister
Copy link

It works for me as well. Thank you guys!

@mdenieffe
Copy link

upgraded from Angular 13.0 to 13.2.2 via the Angular CLI command ng update worked for me. Thanks

@kakhagh
Copy link

kakhagh commented Feb 5, 2022

Problem solved. Thank you guys!

@mwakalingajohn
Copy link

Also worked for me, upgraded from v12 to v13, and fixed the problem.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants