resources.Concat breaks my live reload

Hello, usually whenever you change a template, a stylesheet your Hugo server live reloads and you see the change immediately.

This works:

<!-- works with live-reload, but no concat -->
{{$script1 := resources.Get "vendor/script1.js" }}
{{$script2 := resources.Get "vendor/script2.js" }}
<script src="{{$script1.RelPermalink}}"></script>
<script src="{{$script2.RelPermalink}}"></script>

BUT, when I include concat, a second, manual reload of the browser tab is required to see the change. It still live-reloads on save, just not with the latest change.

<!-- requires an extra reload -->
  $vendor := slice
    (resources.Get "vendor/script1.js")
    (resources.Get "vendor/script2.js")
  | resources.Concat "vendor.js"
<script src="{{$vendor.RelPermalink}}"></script>

To be clear, I’m changing text in a HTML template and not seeing the latest change on save as long as the above snippet is included.

Hugo v0.124.1 on OS X, but the issue has been there for what feels like a year. Only got around to research it today. Any idea why, or how I can rewrite this concat stuff?

With Ubuntu 22.04 I am unable to reproduce the problem as described using v0.124.1 .

git clone --single-branch -b hugo-forum-topic-49256 hugo-forum-topic-49256
cd hugo-forum-topic-49256
hugo server

Open your browser’s dev tools and view the console. You will see two log entries:

This is assets/vendor/script1.js
This is assets/vendor/script2.js

Then, in a separate terminal, do this:

echo "console.log('foo');" >> assets/vendor/script2.js

The page refreshes and the console updates as expected.

Then add some text to layouts/_default/home.html and save. The page refreshes as expected.