Bootsrap 5 and Javascript

I use Hugo extendet, Bootstrap 5 and Sass. Since I need a dropdown menu it also needs javascript. After some searching I found the following modules:

module:
  imports:
    - path: github.com/gohugoio/hugo-mod-bootstrap-scss/v5
    - path: github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 -------- Is this line correct?

in the footer.html i added the following code:

{{ $indexJS := resources.Get "js/index.js" | js.Build }}
<script src="{{ $indexJS.Permalink }}"></script>
go mod init example.com
go mod tidy
hugo server

and the site will be built correctly. Only the dropdown menu does not work. If I use the following code instead, the dropdown menu works fine. What has to be in the assets/index.js?

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
	integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

It’s unnecessary to import the jslibs, since it was imported by the bootstrap module, see https://github.com/gohugoio/hugo-mod-bootstrap-scss/blob/e4d0cb2dcdb6c9d9849c9d65a8a71fb61565c712/config.toml#L20-L21

For using some components, you’ll need to import the corresponding component’s JS in your js/index.js. In this case.

import "js/bootstrap/src/dropdown.js"

You can find all JS on https://github.com/twbs/bootstrap/tree/main/js/src.