If i replace
import { NgbModalRef, NgbModal } from '@ng-bootstrap/ng-bootstrap';
with
import { NgbModalRef, NgbModal } from '@ng-bootstrap/ng-bootstrap/types/ng-bootstrap-ng-bootstrap-modal';
i get trouble with the ng-packagr
Could not resolve "@ng-bootstrap/ng-bootstrap/types/ng-bootstrap-ng-bootstrap-modal" [plugin angular-compiler]
dist/va-controls/fesm2022/my-controls.mjs:8:22:
8 │ ... i1$2 from '@ng-bootstrap/ng-bootstrap/types/ng-bootstrap-ng-boo...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The path "./types/ng-bootstrap-ng-bootstrap-modal" is not exported by package "@ng-bootstrap/ng-bootstrap":
node_modules/@ng-bootstrap/ng-bootstrap/package.json:53:13:
53 │ "exports": {
╵ ^
You can mark the path "@ng-bootstrap/ng-bootstrap/types/ng-bootstrap-ng-bootstrap-modal" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.