I am developing a desktop app with Electron and Angular2 (using Angular-Cli).
I wanted to use Bootstrap so in my angular-cli.json, I added the needed script files to apps[0].scripts like the following:
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js",
"../node_modules/toastr/build/toastr.min.js"
],
When I run the app in web (using ng serve), everything is working fine. But when I run the app with Electron(ng build first, and run Electron from /dist), I encountered the following error: Uncaught Error: Bootstrap's JavaScript requires jQuery. Angular 2 parts are working fine, routing is working, views are rendered correctly, etc.
When I investigated scripts.bundle.js, those 3rd party libraries are included. But Bootstrap codes are before JQuery. Is that the reason why I am seeing the error with Electron?