How to Use Bootstrap in SPFX (SharePoint Framework)
npm install jquery --save
npm install @types/jquery --save
npm install bootstrap --save
npm install @types/bootstrap --save
Add following code in
config.json file
externals": { "jquery": { "path": "node_modules/jquery/dist/jquery.min.js", "globalName": "jQuery" }, "bootstrap": { "path": "node_modules/bootstrap/dist/js/bootstrap.min.js", "globalName": "jQuery" }
Add the below lines in .ts file
import * as jQuery from 'jquery'; import * as bootstrap from 'bootstrap';
Comments
Post a Comment