Fix HMR when parent directory starts with '.' (#4589)
@timneutkens
This simple change seems to work for me:
```
const ignored = [
'**/.*',
'node_modules'
]
```
I believe the regex is used here to try and work on windows as well. So, I wasted a bunch of time trying to figure out how to use a regex and/or the `path` module to ignore the parent directories until I noticed the following:
> glob patterns are not filepaths. They are a type of regular language that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine.
this is from the [anymatch](https://github.com/micromatch/anymatch) documentation which is what webpack uses accoring to this:
https://webpack.js.org/configuration/watch/#watchoptions-ignored
I've verified this glob pattern solves the problem in my environment, can someone test and verify that this works on windows?
👍
Showing
Please
register
or
sign in
to comment