Reputation: 19
I am creating my first electron app and wanted some styling with bootstrap 5. So I:
(1) installed via npm i --save bootstrap jquery popper.js the necessary modules
(2) created a main.scss including @import '~bootstrap/scss/bootstrap';
(3) put into the head of my index.html:
<link rel="stylesheet" href="./contents/bootstrap/5.0.2/css/bootstrap.min.css" />
<script>let $ = require('jquery');</script>
<script>require('popper.js');</script>
<script>const bootstrap = require('bootstrap');</script>
After that I copy+paste a nav bar out of the bootstrap documentation. I dont know what is wrong and I didnt find any answer. Thanks for helping.
Upvotes: 1
Views: 2764
Reputation: 362700
Bootstrap 5 doesn't use jQuery any longer.
Just do:
npm i --save bootstrap@latest
Upvotes: 1