Closed edwardhorsford closed 10 months ago
Hmm, this might be a partial misunderstanding on my part - I perhaps want addWatchTarget to trigger a rebuild. I've tested that and it seems to work.
However it still feels unexpected that items added to watch
explicitly don't trigger a reload.
Nevermind, it seems it was reloading, I just didn't realise.
I think this was a combination of it being too fast, and the logged message including (skips build)
which made me think nothing was happening.
I've told the eleventy dev server to watch a specific file like so:
When this file is saved, I expect and would like Eleventy to rebuild my site. Instead I see this in the console:
This implies I've given it the right watch target (I didn't see this message before adding it), but for some reason despite being told to watch this, it's not triggering a reload.
My guess would be that Eleventy doesn't think this file is used by my site, and so is trying to be smart about not reloading. However my assumption was that any file or set of files explicitly added with the
watch
method would force the reload.