I have an Angular project that makes use of Typescript and Webpack. It's a default Angular project template that comes with Visual Studio 2017.
It basically gives you a simple web application with a few NPM modules installed, like bootstrap and jquery.
I have an "3rd party" javascript file that can't be installed with NPM or Bower, but it does need jQuery.
The web application loads a main-client.js and main-client.vendor.js. Both are created by Webpack. The last one contains the code for Bootstrap, jQuery etc.
The scripts are included like this in my webpage (I actually have more scripts):
<script type="text/javascript" src="~/dist/main-client.js"></script>
<script type="text/javascript" src="~/dist/main-client.vendor.js"></script>
<script type="text/javascript" src="~/plugins/custom.jqueryfile.js"></script>
But the web page keeps giving me the following error:
Uncaught ReferenceError: jQuery is not defined
Below are some images that shows how the script order is setup in my project.
All files are loaded in correct order

So basically my question is: How can I load "3rd party" scripts properly that need to be loaded "globally", but also require jQuery. Is there a general place in my Typescript files somewhere? Or can it be done with Webpack?


<script>? Do you use$in your project?scripttag. Is that really needed? Doesn't thevendor.jshave jquery already in it. Since Iimport bootstrapin my.tsfile (bootstrap automatically includes jquery, right?).