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
then add the following lines to your 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"
}`
Finally add the following lines to your web part .ts file
import * as jQuery from 'jquery';
import * as bootstrap from 'bootstrap';

Comments

  1. Titanium Price Per Pound (UK) - TITanium-ART
    Shop our wholesale price per pound is titanium lighter than aluminum & schick quattro titanium upgrade your account. Shop now! ✓Our Prices thunder titanium lights Work. ✓Titanium-art. columbia titanium boots Rating: 4.1 · titanium exhaust tips ‎1,957 votes

    ReplyDelete

Post a Comment

Popular posts from this blog

How to setup for SharePoint Frame Work Development Environment (SPFx)

Package and Deploy SharePoint Client Side Webpart to SharePoint