it’s simpler to see:
{{$searchjs := resources.Get “js/search.js”}}
{{$menuresetjs := resources.Get “js/menu-reset.js”}}
{{$flexsearchjs := resources.Get “js/flexsearch.min.js”}}
{{$clipboardjs := resources.Get “js/clipboard.js”}}
{{$swregisterjs := resources.Get “js/sw-register.js”}}
{{- $styles := resources.Get “main.scss” | resources.ExecuteAsTemplate “main.scss” . | resources.ToCSS (dict “transpiler” “dartsass”) | minify | fingerprint “md5” }}
{{- $bundlejs := slice $searchjs $menuresetjs $flexsearchjs $clipboardjs $swregisterjs | resources.Concat “js/bundle.js” | resources.ExecuteAsTemplate “js/bundle.js” . | minify | fingerprint “md5” }}
Error: error building site: EXECUTE-AS-TEMPLATE: failed to transform "js/bundle.js" (text/javascript): template: js/bundle.js:185:46: executing "js/bundle.js" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
I don’t understand why concat doesn’t produce bundle.js, all my files are present in due location:
4096 /home/drm/WEBSITE/assets/js
590 ├── clipboard.js
18K ├── flexsearch.min.js
206 ├── menu-reset.js
2613 ├── search.js
222 ├── sw-register.js
1254 └── sw.js