-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable --watch
Debounce
#1061
Comments
Isn't this solved by setting cascade to false? |
In our case, we're using As an example, let's take a look at this configuration in two projects: project-a/package.json
{
"wireit": {
"copy-assets": {
"command": "rm -rf assets/client && cp -r node_modules/project-b/build assets/client",
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/project-b/build"
]
}
}
} project-b/package.json
{
"wireit": {
"watch": {
"command": "webpack --watch",
"service": true
}
}
} You would also see the same problem with the above configs if you opened two separate terminals and ran |
Ah ok that makes sense! |
When using something like
webpack --watch
in a service it can cause conflicts with Wireit's--watch
option. The build tool progressively outputs and can trigger multiple rebuilds successively in downstream packages. We're currently implementing this by usingnodemon
but that feels like an unnecessary extra step when we have watch support already inwireit
.I noticed that there's currently a debounce implemented in the watcher already with a value of
0
and it would be great if we could set this to a configurable value. Since--watch
itself is not a configuration option but is rather an option I think it makes sense to also make this an option.--watch --delay <ms>
seems appropriate. Havingdelay
in thepackage.json
doesn't feel like it makes sense since it only applies to--watch
.The text was updated successfully, but these errors were encountered: