Let "hs watch" only upload changed files
arinker opened this issue · 4 comments
Description and Context
The hs watch
command uploads each file as soon as the file is saved without checking if the file has changed.
This significantly slows down the development process with any build tool (Webpack, Vitejs, ...).
Steps to reproduce
Just open a file in a folder watched by hs watch
and save it without any changes while hs watch
is running.
Expected behavior
hs watch
should only upload files with a new checksum.
Who to Notify
@arinker I'm not sure if this is something we'd consider in the near term, however I've marked it as an enhancement for now.
Have you seen https://www.npmjs.com/package/@hubspot/webpack-cms-plugins? It is webpack specific but might be useful in your workflow.
Is there some new information about this feature? It would really improve our Development Workflow.
Dug into this a bit today, the library we use for watching files (chokidar) emits the change event even if there are no changes to the saved file and has no option to ignore. I've filed an issue to fix this: paulmillr/chokidar#1283
I could work around it in the mean time, either by converting to a means file watching that doesn't have this problem or implementing the feature myself, but it may take a little longer than expected.