Does't watch changes with a large codebase
See original GitHub issueI am migrating a project from webpack 4 to webpack 5. The project contains a large code base, most of the files are contained in node_modules. After building in dev mode, webpack does not rebuild to file changes, it does not even give an error. After a series of experiments on disabling package imports, at some point the watch mode starts working, because there is less code in build.
When poll:true, watch mode starts working, but rebuild takes extremely long time(about 40 seconds)
I can try set ulimit -n and maxfiles to max values, but that didn’t help.
version: 2.0.0-beta.14 os: macOS 10.15.4
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
How do you dive into large code bases?
what I've always done is the following: Open multiple copies of my editor (Visual Studio/Eclipse/Whatever) and then debug and do line breaks step...
Read more >Ask HN: How to understand the large codebase of an open ...
First, make sure you can build and run this code. Open Source is usually good about this. Next, pick a path and start...
Read more >VSC unable to watch for file changes in this large workspace ...
I just started using VSCode version 1.24.1. After loading a folder, it shows warning. Visual Studio Code is unable to watch for file...
Read more >What's the best way to upgrade an outdated codebase ...
The first and most obvious option is a Big Bang rewrite: changing the codebase from scratch and cutting over all users in a...
Read more >5 ways to make your codebase withstand the test of time
You need to find the appropriate code, navigate through related files, take a look at the tests, and when you feel confident enough,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I wasn’t able to reproduce the weird paths in your repro. Probably it’s a MacOS only issue…
But I found some bugs in the recursive watching code path and fixed them in https://github.com/webpack/watchpack/releases/tag/v2.0.0-beta.15 I can’t tell for sure that it fixes your problems, but maybe you can try this release and verify it. There is also a logging mode enabled with
WATCHPACK_RECURSIVE_WATCHER_LOGGING=1env var, which tells you what the recursive watchers do…For this case, I created a test repository, these paths are reproduced https://github.com/WaveString/webpack-5-example