MCPcopy
hub / github.com/webpack/webpack / watch

Method watch

lib/Compiler.js:530–540  ·  view source on GitHub ↗

* Returns a compiler watcher. * @param {WatchOptions} watchOptions the watcher's options * @param {Callback<Stats>} handler signals when the call finishes * @returns {Watching | undefined} a compiler watcher

(watchOptions, handler)

Source from the content-addressed store, hash-verified

528 * @returns {Watching | undefined} a compiler watcher
529 */
530 watch(watchOptions, handler) {
531 if (this.running) {
532 handler(new ConcurrentCompilationError());
533 return;
534 }
535
536 this.running = true;
537 this.watchMode = true;
538 this.watching = new Watching(this, watchOptions, handler);
539 return this.watching;
540 }
541
542 /**
543 * Processes the provided stat.

Callers

nothing calls this directly

Calls 1

handlerFunction · 0.50

Tested by

no test coverage detected