I’m new to Hugo but I’m wondering how to include jaavascript libs from node_modules?
I was able to it with css like:
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed") }}
{{ $style := resources.Get "sass/main.scss" | toCSS $options }}
and my assets/sass/main.scss
contains:
@import "node_modules/bootstrap/scss/bootstrap";
@import "node_modules/@fortawesome/fontawesome-pro/scss/fontawesome";
this works nicely.
But I cannot find any documentation how to replace below script inclusions so they are retrieved from nodule_modules
as well.
<script src="../../assets/js/vendor/popper.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>