watchpack: Watch Fails on versions > 1.6.1

Hi,

I recently discovered my webpack watch had stopped working after reinstalling node modules. After a lot of digging i pinned the issue down to this package. Basically when i use any other version of this package > 1.6.1 the watcher does not keep the process alive anymore. There is no error in the console but the process.on('exit', handler fires.

I am using webpacks node api as follows:

var compiler = webpack(params);

  if (watch) {
    compiler.watch({
      ignored: /node_modules/
    }, onBuildComplete);
  }
  else {
    compiler.run(onBuildComplete)
  }

I thought it was only me but many of my team mates are experiencing the same thing.

We are watching quite a lot of files (> 800) which might be a contributing factor.

node: 10.21.0 npm: 6.1.0 webpack: 4.43.0 Windows 10 Enterprise

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 16 (10 by maintainers)

Most upvoted comments

@kane-mason It’s great that we caught this problem. I think we should leave it open to other developers. This is one of many reasons why we want to migrate from chokidar to native watch.

Native performance and and compatibility issues must be addressed to node side. In long term developers should use native modules without any additional layers. Just my opinion.