Skip to content
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

The "poll" property name on watchFiles option #3365

Closed
1 of 2 tasks
muzuiget opened this issue May 29, 2021 · 4 comments · Fixed by #3366
Closed
1 of 2 tasks

The "poll" property name on watchFiles option #3365

muzuiget opened this issue May 29, 2021 · 4 comments · Fixed by #3366

Comments

@muzuiget
Copy link

  • This is a bug
  • This is a modification request

The watchFiles option is added #3136, and the testcase code show that we should use the property name usePolling.

{ paths: ['dir'], options: { usePolling: true } },

But it isn't work.

After reading the code:

const usePolling = watchOptions.poll ? true : undefined;

We should use poll instead.

@anshumanv
Copy link
Member

Good catch, will fix

@anshumanv
Copy link
Member

anshumanv commented May 29, 2021

@alexander-akait I think we should use same properties as chokidar options, presently we use poll to calculate interval option value, we can just read usePolling and interval and pass it to config, i.e no resolving on our side

@alexander-akait
Copy link
Member

Ideally we should respect watchOptions from webpack, but rename them if needed

@anshumanv
Copy link
Member

we can add fallback logic to support both maybe -

usePolling: (!!watchOptions.poll || watchOptions.usePolling)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants