codymikol / karma-webpack

Karma webpack Middleware
MIT License
829 stars 222 forks source link

Webpack watches file changes in singleRun mode #448

Closed shihabuddin closed 3 years ago

shihabuddin commented 4 years ago

Expected Behavior

When singleRun is set to true, webpack dev middleware doesn't watch for file changes.

Actual Behavior

When singleRun is set to true, webpack dev middleware watches for file changes and re-compiles them when I make changes.

Code

https://github.com/shihabuddin/karma-webpack-watch

How Do We Reproduce?

ryanclark commented 4 years ago

Thank you so much for providing a reproducible repo for this issue. I'll take a look at it this week/weekend.

shihabuddin commented 4 years ago

I am working on creating a PR with a suggested fix.

shihabuddin commented 4 years ago

@ryanclark Any update on this? I have submitted a PR for this. Please let me know, if I can do anything to help merge the PR.

SebastianStehle commented 3 years ago

Any update on this? I am having the problem that my build server cannot handle all the watches.

I get a lot of errors like this

Error from chokidar (/src/app/features/rules/pages/rules/triggers): Error: ENOSPC: System limit for number of file watchers reached, watch '/src/app/features/rules/pages/rules/triggers/usage-trigger.component.scss'...

I can probably fix it on my server, but as an open source project it should also build without these warnings on other servers.

is there a workaround?

shihabuddin commented 3 years ago

I have created a test-v5 branch on the reproduce repo and upgraded karma-webpack to v5.0.0. I can't reproduce this issue any more.