What is the function of --poll flag in CLI

前端 未结 1 889
轮回少年
轮回少年 2021-01-18 19:49

I was searching a solution for an issue which is in my angular project, ng serve --watch was not detecting changes in some of the files.

And I got a sol

1条回答
  •  心在旅途
    2021-01-18 19:59

    In cases where Angular CLI is running in a shared directory on linux VM on a windows host the webpack dev server isn't detecting file changes from the host environment. (ex: Whenever a docker dev environment is running on a windows host.) This is solved by adding poll option to the webpack dev server configuration. By default when no poll interval is set watchpack will use native file system change detection. This change allows for setting the poll interval which will turn on polling.

    Ref: https://github.com/angular/angular-cli/pull/1814#issuecomment-241854816

    0 讨论(0)
提交回复
热议问题