Utilizing Bootstrap in both HTML and JavaScript/TypeScript has been my recent endeavor. I have successfully imported the minified versions of Bootstrap JS and CSS in my HTML file and incorporated this line of code in my TypeScript:
import * as bootstrap from "bootstrap";
However, when attempting to execute the following snippet:
var myModal = new bootstrap.Modal(document.getElementById('popup'), {
keyboard: false
})
myModal.hide()
The Chrome console threw an error message:
Uncaught TypeError: Failed to resolve module specifier "bootstrap". Relative references must start with either "/", "./", or "../".