Skip to content

Commit

Permalink
Make sure errors are always displayed when watching for changes (#9810)
Browse files Browse the repository at this point in the history
* Make sure errors are always displayed when watching for changes

* Update changelog
  • Loading branch information
thecrypticace authored Nov 11, 2022
1 parent 1482c75 commit 4ccc0fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fix watching of files on Linux when renames are involved ([#9796](https://github.com/tailwindlabs/tailwindcss/pull/9796))
- Make sure errors are always displayed when watching for changes ([#9810](https://github.com/tailwindlabs/tailwindcss/pull/9810))

## [3.2.3] - 2022-11-09

Expand Down
17 changes: 17 additions & 0 deletions src/cli/build/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,23 @@ export async function createProcessor(args, cliConfigPath) {
console.error()
console.error('Done in', (end - start) / BigInt(1e6) + 'ms.')
})
.then(
() => {},
(err) => {
// TODO: If an initial build fails we can't easily pick up any PostCSS dependencies
// that were collected before the error occurred
// The result is not stored on the error so we have to store it externally
// and pull the messages off of it here somehow

// This results in a less than ideal DX because the watcher will not pick up
// changes to imported CSS if one of them caused an error during the initial build
// If you fix it and then save the main CSS file so there's no error
// The watcher will start watching the imported CSS files and will be
// resilient to future errors.

console.error(err)
}
)
}

/**
Expand Down

0 comments on commit 4ccc0fa

Please sign in to comment.