js: Fix js.Batch for multihost setups

Note that this is an unreleased feature.

Fixes #13151
This commit is contained in:
Bjørn Erik Pedersen
2024-12-16 08:34:17 +01:00
parent 48dd6a918a
commit 565c30eac9
8 changed files with 190 additions and 71 deletions

7
deps/deps.go vendored
View File

@@ -24,6 +24,7 @@ import (
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/internal/js"
"github.com/gohugoio/hugo/internal/warpc"
"github.com/gohugoio/hugo/media"
"github.com/gohugoio/hugo/resources/page"
@@ -105,6 +106,12 @@ type Deps struct {
// TODO(bep) rethink this re. a plugin setup, but this will have to do for now.
WasmDispatchers *warpc.Dispatchers
// The JS batcher client.
JSBatcherClient js.BatcherClient
// The JS batcher client.
// JSBatcherClient *esbuild.BatcherClient
isClosed bool
*globalErrHandler