mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
885eee8021
@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? 👍 |
||
---|---|---|
.. | ||
lib | ||
config.js | ||
document.js | ||
hot-reloader.js | ||
index.js | ||
next.js | ||
on-demand-entry-handler.js | ||
render.js | ||
require.js | ||
router.js | ||
utils.js |