I have been struggling with getting bootstrap-dialog to work in an spfx client web part. So far I was able to get jquery, bootstrap, datatables working but can't seem to get bootstrap-dialog working. Has anyone had any luck with this?
First I was trying to add the library into the externals section of the config.json but never got this working.
I ended up just using this line in my web part render method:
SPComponentLoader.loadScript('https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.35.4/js/bootstrap-dialog.js', { globalExportsName: 'jQuery' }).then((): void => {
});
Adding the bootstrap-dialog css the same way...
SPComponentLoader.loadCss('https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.35.4/css/bootstrap-dialog.css');
Using the development tools in Chrome, I can see that this library is successfully called but I get the error message in the console:
Uncaught ReferenceError: BootstrapDialog is not defined at HTMLAnchorElement. (SpfxWebPart.ts:218) at HTMLDocument.dispatch (jquery.js:5206) at HTMLDocument.elemData.handle (jquery.js:5014) (anonymous) @ SpfxWebPart.ts:218 dispatch @ jquery.js:5206 elemData.handle @ jquery.js:5014