Lazy load @parcel/watcher and fallback to chokidar #2414
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on google/dart_cli_pkg#169
With this change, it no longer fails on loading
sass
on CLI or API if@parcel/watcher
's optional dependency is not available. The error about missing optional dependency is printed once per execution only if user actually used--watch
flag on CLI, and then it fallbacks to chokidar for that whole execution.To test the new behavior, run
npm install --omit optional
to remove@parcel/watcher
's optional depenency. Then runnode build/npm/sass.js
ornode build/npm/sass.js --watch [...]
to see it in action.I'm bumping dart-sdk requirement to 3.3.0 in order to use new
dart:js_interop
, as the legacypackage:js_interop/js_interop.dart
is giving me lots of troubles. E.g. cannot add non-static helper methods to an@JS
class etc.