-
Notifications
You must be signed in to change notification settings - Fork 370
Closed
Labels
JavaScriptIssues particular to the Node.js distributionIssues particular to the Node.js distributionenhancementneeds info
Description
Is it possible to make dart-sass load chokidar only when actually watching files?
In trying to optimise my build chain, I've noticed dart-sass loads the chokidar dependency, even when the watch functionality isn't actually used. While the absolute timings are small (though depending on cpu, I/O, etc), chokidar is relatively heavy, since it accounts for ~75% of the time it takes to load dart-sass. At least, in my tests.
55 ms │ ├─ node_modules/sass/sass.dart.js (2x)
43 ms │ │ └─ node_modules/chokidar/index.js (10x)
4 ms │ │ ├─ node_modules/readdirp/index.js (2x)
4 ms │ │ │ └─ node_modules/picomatch/index.js
18 ms │ │ ├─ node_modules/chokidar/node_modules/braces/index.js (4x)
4 ms │ │ │ └─ node_modules/chokidar/node_modules/braces/lib/compile.js (2x)
9 ms │ │ └─ node_modules/chokidar/lib/fsevents-handler.js (2x)
8 ms │ │ └─ node_modules/fsevents/fsevents.js
I'm not that well versed in Dart. But i'm willing to take a crack at it.
Metadata
Metadata
Assignees
Labels
JavaScriptIssues particular to the Node.js distributionIssues particular to the Node.js distributionenhancementneeds info