Hello, I’m using Hugo with Babel. At the bottom of my HTML file I included the following code:
{{ $script := resources.Get "js/main.js" | resources.Babel | resources.Minify }}
<script src="{{ $script.Permalink }}"></script>
Everything seems to work fine. The only issue is that if Babel is not installed, then Hugo doesn’t start the server. Is there a way to check if Babel is available and only load it in that case? otherwise just use the javascript file as it is?
Thank you!