I would like to add a bootstrap add-on, namely Bootstrap Toggle to a JHipster Project. The project consists of a .css
and .js
file and requires jquery.
Simply adding this to index.html
works fine but feels hacky.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
I would like to take advantage of yarn and webpack. I tried adding a vendor.css
to the content folder which imports the toggle css file, but that didn't seem to do anything:
@import 'node_modules/boostrap-toggle/css/bootstrap-toggle.css';
How can I add Bootstrap Toggle (or similar libraries) from my node_modules
folder to the application?