Framework: Laravel 9 Bundler: Vite
Bootstrap namespace is still missing after multiple attempts of my knowledge and googling around. I can only access the bootstrap namespace if I only add bootstrap to the window object.
If I will use the window.bootstrap, Modal.show() method is still undefined and I can't manually toggle the Modal to pop up. Now leaving that as the only solution, I probably know there is something better solution than using the window object as the Bootstrap 5.2 has already an official guide. Event attempting to use the same configuration, the boostrap.esm file is already bundled and the bootstrap namespace nor the boostrapo constructors cannot be accessed. I was thinking that probably the js isn't loaded fully so I tried delaying the constructor inits.
I hope there is a solution for this as I am stuck for 2 days with the problem. I can't use cdn since the web app will be offline and the bundled js with be a big help.
importing manually the Module does not also work since "new Modal()" still undefined even the page is already fully loaded. import { Modal } from 'bootstrap'

