Boostrap via npm

Hi codders , so am trying to install boostrap via npm , am using cmder, which install the boostrap json package in my project directory . How do i get the boostrap to work on my html? i have used boostrap via CDN and it worked perfectly am trying to explore a second option

Hello!

Well, it will vary depending on your project, but you usually just include the styles on your main JavaScript file:

// index.js
import "bootstrap";

If it’s a react/vue/angular project, then you may also need their bootstrap implementations, namely: react-bootstrap, BootstrapVue or ng-bootstrap.

These projects rely on the presence of a bundler, like webpack or parceljs, otherwise will be hard to include the dependencies (unless you copy the node_modules directory in your project, which you shouldn’t).