Using bootstrap v5 modules imported to Vanilla JS

So I have found the solution to my problem in case anyone faces the same issue:

Apparently because bootstrap doesn’t have a export default or it’s not correctly configured you need to import like this import * as bootstrap from 'bootstrap'; for it to work. And to be able to use the bootstrap object

I don’t know why the official documentation says you should do import bootstrap from 'bootstrap'; but there you go

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top