Skip to content

Subdirectories are not watched in dev environment for Linux OS #13140

@Rahmon

Description

@Rahmon

Describe the bug
The recursive option in fs.watch is only supported on macOS and Windows. So on Linux the subdirectories aren't watched when i run npm run dev.

fs.watch( path.resolve( p, 'src' ), { recursive: true }, ( event, filename ) => {

To Reproduce
Steps to reproduce the behavior:

  1. On Linux OS clone the project.
  2. Run npm i and npm run dev.
  3. Make some change in file: packages/block-library/src/paragraph/index.js
  4. Change isn't watched (nothing happens)

Expected behavior
"watch" to work on Linux too.. 😞 .

Possible solution
I've used node-watch package.

Desktop (please complete the following information):

  • OS: Fedora 29
  • Version 4.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions