Replies: 2 comments 1 reply
-
That's a good finding, I wouldn't mind having a PR for that. The reason I use watch is because the way WebPack is currently setup with the monorepo dev seems to be using the in which occasion would that be a bad idea to use? If it's just an issue on VM then I don't care much and yes a note in readme might be enough. Does this flag rebuild with tsc after a file is changed? There aren't that many people contributing anyway, unfortunately, so I don't think that will have much of an impact. I'm also on Windows and I do see lots of NodeJS threads, I never realized it was because of this and the more I add new packages then the more that would consume threads, I'd be ok with this fix if I can speedup development a lot. Side note, CI/CD GitHub Actions doesn't use dev watch to run, it instead run a WebPack prod build and that is what's then use to run Cypress tests. Another side note, I switched from |
Beta Was this translation helpful? Give feedback.
-
After reading this more thoroughly https://github.com/microsoft/TypeScript-Handbook/blob/master/pages/Configuring%20Watch.md#configuring-file-watching-using-environment-variable-tsc_watchfile and learning you are also on Windows I think we could just do this: "dev:watch": "cross-env TSC_WATCHFILE=UseFsEventsWithFallbackDynamicPolling lerna run dev:watch --parallel", About |
Beta Was this translation helpful? Give feedback.
-
slickgrid-universal is a monorepo using lerna and when running
yarn dev:watch
spawns many node.js processes and on my Windows system a lot of them use 4-5% CPU just watching/polling the file system for changes.That prohibits effective coding, makes Cypress tests time out, etc.
I found this: https://cmdcolin.github.io/2021-09-05-typescript.html and just setting environment variable
TSC_WATCHFILE = 'UseFsEvents'
makes all node.js processes go to 0-0.3% 😄I don't think that would be good to do for all platforms by default. But perhaps document in
README.md
?Beta Was this translation helpful? Give feedback.
All reactions