Hugo development only updates html when md changing

I have hugo stack with webpack and browsersync. Updating the files in the layout does not update the development server. Only when I do changes to content files the html files update.

  "start:hugo": "hugo  -d  ../dist -s site   --environment development --gc -v --watch --logLevel debug --noBuildLock  -D -F",

Here is the output when I do changes to the index file in layouts:

DEBUG cachebuster: Matching “layouts/index.html” with source “(postcss|tailwind)\.config\.js”: no match
Template changed /index.html
DEBUG Direct dependencies of “index.html” (identity.StringIdentity) =>
INFO build: step process substep resolve page output change set changes 1 checked 163 matches 0 duration 442.083µs
INFO build: step process substep gc dynacache duration 920.375µs
INFO build: step process substep rebuild templates duration 11.968292ms
INFO build: step process duration 13.757959ms
INFO build: step assemble duration 42ns
INFO build: step render substep pages site en outputFormat html duration 63.458µs
INFO build: step render substep pages site en outputFormat rss duration 61.083µs
INFO build: step render pages 0 content 0 duration 1.426042ms
INFO build: step postProcess duration 6.75µs
INFO build: duration 15.2675ms

Only when I do changes to the md file in content folder I get an update to the html output:

DEBUG cachebuster: Matching “content/_index.md” with source “(postcss|tailwind)\.config\.js”: no match
Source changed /_index.md
DEBUG Direct dependencies of “/” (*hugolib.pageState page-1) =>
INFO build: step process substep resolve page output change set changes 1 checked 163 matches 0 duration 754µs
INFO build: step process substep gc dynacache duration 1.581083ms
INFO build: step process substep collect files 47 files_total 47 duration 4.3635ms
INFO build: step process duration 7.362541ms
INFO build: step assemble duration 885.875µs
INFO build: step render substep pages site en outputFormat html duration 38.228625ms
INFO build: step render substep pages site en outputFormat rss duration 3.914041ms
INFO build: step render pages 56 content 39 duration 42.231917ms
INFO build: step postProcess duration 8.75µs
INFO build: duration 50.592ms

I am currently using “hugo-bin-extended”: “^0.124.1”

Cheers
Olaf

This may be related to https://github.com/gohugoio/hugo/issues/12296, which is also a --watch issue. If I’m reading the lengthy thread correctly, it looks like the OP (with bep’s help) found a workaround.

Yes, seems to be related. Due to my setup, I cannot use hugo server. I did test it and even without the --disableFastRender, the templates updating correctly.

Why not? With v0.123.0 and later hugo server writes to disk.

Because of my stack and folder setup. It does not bundle the JS or CSS which is done through webpack.

Looks like you’ll have to wait until #12296 is addressed, or find another way. As mentioned in the issue, the --watch option is not widely used, so I suspect this may linger in the queue for a long time.

Thanks