Skip to content

[Bug]: Modify the dev.watchFiles in plugin is not effective #4503

@FaureWu

Description

@FaureWu

Version

System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 87.22 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 132.0.6834.160
    Edge: 126.0.2592.81
    Safari: 18.1.1
  npmPackages:
    @rsbuild/core: ^1.2.3 => 1.2.4
    @rsbuild/plugin-react: ^1.1.0 => 1.1.0

Details

When I try to add dev.watchFiles listening in the plugin and restart the server when it changes, it doesn't work.

Below is the code sample. Please see the reproduction steps:

Reproduce link

https://github.com/FaureWu/rsbuild-watchfiles-bug

Reproduce Steps

  1. pnpm i
  2. pnpm run dev
  3. Modify needwatch.config.ts
  4. The server should normally trigger a restart, but it currently doesn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions