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

Make sure errors are always displayed when watching for changes #9810

Merged
merged 2 commits into from Nov 11, 2022

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Nov 11, 2022

Fixes #9798

My testing also revealed an unfortunate DX problem due to the way PostCSS works:

  1. Runners are promise based if any plugin is async
  2. If any runners error then the promise rejects with an error
  3. The error does NOT have access to the partial result that would've been built up
  4. Therefore we can't get even a partial list of dependencies to watch for more changes from an initial build

As a result of this, if there is an error produced in a file that is @import-ed we won't pick it up as something that can be watched for changes until the build succeeds at least once. The workaround is to fix the error and re-save the input CSS file. I've added a TODO to find a way to work around this.

@thecrypticace thecrypticace merged commit 4ccc0fa into master Nov 11, 2022
@thecrypticace thecrypticace deleted the fix/watch-always-show-errors branch November 11, 2022 15:14
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

Successfully merging this pull request may close these issues.

Problem with invalid classname in custom CSS using @apply when watching
1 participant