From 70cf591f04ec7d5e71681f9b7165e9ee7b477e18 Mon Sep 17 00:00:00 2001 From: Paul Cowan Date: Sat, 29 Aug 2020 08:12:45 +0100 Subject: [PATCH 1/3] add RegExp to the include and exclude fields of the WatcherOptions type --- CHANGELOG.md | 1 - src/rollup/types.d.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c0974e733d..320793c9f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ # rollup changelog -## 2.26.9 *unreleased* ### Pull Requests diff --git a/src/rollup/types.d.ts b/src/rollup/types.d.ts index bd95c1fe609..b854be6b651 100644 --- a/src/rollup/types.d.ts +++ b/src/rollup/types.d.ts @@ -754,8 +754,8 @@ export interface WatcherOptions { buildDelay?: number; chokidar?: ChokidarOptions; clearScreen?: boolean; - exclude?: string[]; - include?: string[]; + exclude?: (string | RegExp)[]; + include?: (string | RegExp)[]; skipWrite?: boolean; } From 55a45c9650827bf9bf881be76f20103464820ada Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 1 Sep 2020 07:00:42 +0100 Subject: [PATCH 2/3] Update src/rollup/types.d.ts Co-authored-by: Lukas Taegert-Atkinson --- src/rollup/types.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rollup/types.d.ts b/src/rollup/types.d.ts index b854be6b651..0066f1d7d53 100644 --- a/src/rollup/types.d.ts +++ b/src/rollup/types.d.ts @@ -754,8 +754,8 @@ export interface WatcherOptions { buildDelay?: number; chokidar?: ChokidarOptions; clearScreen?: boolean; - exclude?: (string | RegExp)[]; - include?: (string | RegExp)[]; + exclude?: string | RegExp | (string | RegExp)[]; + include?: string | RegExp | (string | RegExp)[]; skipWrite?: boolean; } From 4330dcda9f99a3a0c223dbcea54e4b64eb762cb7 Mon Sep 17 00:00:00 2001 From: Paul Cowan Date: Tue, 1 Sep 2020 07:06:43 +0100 Subject: [PATCH 3/3] update WatcherOptions type include/exclude in99-big-list-of-options.md --- docs/999-big-list-of-options.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/999-big-list-of-options.md b/docs/999-big-list-of-options.md index 92c214746f3..3fd97f8ef8d 100755 --- a/docs/999-big-list-of-options.md +++ b/docs/999-big-list-of-options.md @@ -1509,7 +1509,7 @@ Default: `true` Whether to clear the screen when a rebuild is triggered. #### watch.exclude -Type: `string`
+Type: `string | RegExp | (string | RegExp)[]`
CLI: `--watch.exclude ` Prevent files from being watched: @@ -1525,7 +1525,7 @@ export default { ``` #### watch.include -Type: `string`
+Type: `string | RegExp | (string | RegExp)[]`
CLI: `--watch.include ` Limit the file-watching to certain files. Note that this only filters the module graph but does not allow to add additional watch files: