question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does't watch changes with a large codebase

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
sokracommented, Aug 27, 2020

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=1 env var, which tells you what the recursive watchers do…

1reaction
WaveStringcommented, Aug 27, 2020

Interesting, very interesting, maybe some plugin do it, what is plugins do you use?

For this case, I created a test repository, these paths are reproduced https://github.com/WaveString/webpack-5-example

Screenshot at Aug 27 15-28-40
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found