docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Implement a small wrapper that runs the bundler in watch mode with an explicit watch root, a selectable watcher backend, and ignore rules for noisy paths. The wrapper should expose a simple API and minimal logging so a developer can run and stop the watcher programmatically.
/**
* Starts watch mode with a chosen backend, ignore globs, and watch root.
* Returns an async function that stops the watcher.
*
* @param {Object} options
* @param {string} options.entry - Entry file or directory to build.
* @param {string} options.watchDir - Directory that defines the watch scope.
* @param {string[]} options.ignore - Glob patterns that must not trigger rebuilds.
* @param {string=} options.backend - Optional watcher backend identifier.
* @param {(message: string) => void} options.log - Logger for startup and rebuild notices.
* @returns {Promise<() => Promise<void>>}
*/
export async function runWatcher(options);Bundler and watcher dependency for running builds with selectable backends and ignore lists.