Skip to content

watchContentBase watches for the first level only, ignoring deeper folders #1227

Description

@creage
  • Operating System: Windows 10
  • Node Version: 9.2.0
  • NPM Version: 5.5.1
  • webpack Version: 3.10.0
  • webpack-dev-server Version: 2.9.7
  • This is a bug
  • This is a feature request
  • This is a modification request

Code

  // webpack.config.js
...
devServer: {
    ...
    contentBase: DEST,
    watchContentBase: true,
    ...
}

Expected Behavior

Setting watchContentBase to true should watch contentBase paths all way deep

Actual Behavior

According to chockidar documentation, setting depth parameter limits the depth of folders being traversed, and the fix of #1208 limits it to 0, leading to changes in the deeper folders being ignored, and not triggering recompilation.

For Bugs; How can we reproduce the behavior?

  1. Place some folder with files and nested structure in the contentBase folder (folder1/folder2/file1.css)
  2. Start webpack-dev-server with watchContentBase: true
  3. Change file1.css from the structure created on step 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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