How to implement JQuery and Bootstrap in Electron app


#1

I packaged my Angular2-Electron app up after I figured it was ready for production and ran into an error on the way. The errors that came up was that my boot strap and JQuery wasn’t able to be found. Right now i am loading it inside my index.html through node_modules. This worked great until I had to package it. What is the best way to load JQuery and bootstrap locally so that my electron app can find it? The Error I am getting is Error cannot find module I understand the reason why, it’s because when electron packs things up everything is moved to one file, I just can’t figure out where and when to load up bootstrap and JQuery to that corresponding location

index.html:

  <script>window.$ = window.jQuery = require('../node_modules/jquery/dist/jquery.min.js');</script>

  <script src="../node_modules/jquery/dist/jquery.min.js"></script>

  <script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>

  <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">

  <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap-theme.min.css">