How to import Bootstrap as NPM module if aliased? #31460
Unanswered
martinbean
asked this question in
General
Replies: 1 comment
-
you should import Bootstrap like that if you want to import everything: import 'bootstrap'; if you want to import separate components you can do: import { Modal } from 'bootstrap'; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m slowly migrating a project that uses Bootstrap 4 to Bootstrap 5, so have both versions installed side by side. I did that like this:
In my JavaScript file where I want to import Bootstrap 5, I’m doing this:
However, this throws the following error when trying to compile using Laravel Mix (which is basically a wrapper around Webpack):
How do I go about importing Bootstrap’s JavaScript if using an NPM alias like this?
Beta Was this translation helpful? Give feedback.
All reactions