dev.watchFiles

  • Type:
type WatchFiles = {
  paths: string | string[];
  type?: 'reload-page' | 'reload-server';
  // watch options for chokidar
  options?: WatchOptions;
};
  • Default: undefined

Watch specified files and directories for changes. When a file change is detected, it can trigger a page reload or restart the dev server.

INFO

The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - dev.watchFiles.