type WatchFiles =
| {
paths: string | string[];
type?: 'reload-page';
// watch options for chokidar
options?: WatchOptions;
}
| {
paths: string | string[];
type?: 'reload-server';
};
type WatchFilesConfig = WatchFiles | WatchFiles[];undefinedWatch specified files and directories for changes. When a file change is detected, it can trigger a page reload or restart the dev server.
The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - dev.watchFiles.