diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/index.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index e70dd7f..1c02649 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,8 +10,10 @@ <script src="https://unpkg.com/react@17/umd/react.production.min.js" crossorigin></script> <script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" crossorigin></script> {{ end }} + {{/* We (Hugo/ESBuild) needs to improve the worker integration, but this could be a OK workaround. */}} + {{ $worker := resources.Get "js/myworker.js" | js.Build }} {{ $inject := slice "js/shims/process.js" }} - {{ $js := resources.Get "js/main.js" | js.Build (dict "minify" false "params" (dict "myparam" "Hugo Rocks!") "inject" $inject ) }} + {{ $js := resources.Get "js/main.js" | js.Build (dict "minify" false "params" (dict "myparam" "Hugo Rocks!" "myworker" $worker.RelPermalink) "inject" $inject ) }} <script src="{{ $js.RelPermalink }}"></script> {{ partialCached "jslibs/alpinejs/script-src.html" "-" }} </head> |