Make sure that unreferenced but changed bundle resources gets republished

Fixes #13748
This commit is contained in:
Bjørn Erik Pedersen
2025-05-28 09:18:16 +02:00
parent 13e1617557
commit 766a2e7868
8 changed files with 77 additions and 38 deletions

View File

@@ -20,6 +20,7 @@ import (
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/config/allconfig"
"github.com/gohugoio/hugo/lazy"
"github.com/gohugoio/hugo/output"
"github.com/gohugoio/hugo/resources/internal"
"github.com/gohugoio/hugo/resources/jsconfig"
@@ -189,7 +190,7 @@ func (r *Spec) NewResource(rd ResourceSourceDescriptor) (resource.Resource, erro
gr := &genericResource{
Staler: &AtomicStaler{},
h: &resourceHash{},
publishInit: &sync.Once{},
publishInit: &lazy.OnceMore{},
keyInit: &sync.Once{},
includeHashInKey: isImage,
paths: rp,