Angular Cli Webpack, How to add or bundle external js files?
<p>I am not sure how to include JS files (vendors) after switching Angular Cli from SystemJs to Webpack.</p>

<p><strong>For example</strong></p>

<p>Option A</p>

<p><em>I have some js files that were installed via npm. Adding script tags to the head tag like this does not work. Nor does it seem like the best way.</em></p>

<pre><code>&lt;head&gt;
   &lt;script src="node_modules/some_package/somejs.js"&gt;
&lt;/head&gt;

//With systemJs I could do this

&lt;head&gt;
   &lt;script src="vendor/some_package/somejs.js"&gt;
&lt;/head&gt;
</code></pre>

<p>Option B</p>

<p><em>Include these js files as part of the webpack bundle. This seems like the way it probably should be done. However I am not sure how to do this as all of the webpack code seems to be hidden behind the angular-cli-webpack node package. I was thinking maybe there is another webpack config that we might have access to. But I am not sure as I didn't see one when creating a new angular-cli-webpack project.</em></p>

<p><strong>More Info:</strong></p>

<p>The js files I am trying to include need to be included before the Angular project. For example jQuery and a third party js lib that isn't really setup for module loading or typescript.</p>

<p><strong>References</strong>
<a href="https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md" rel="noreferrer">https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md</a>
<a href="https://github.com/angular/angular-cli/tree/webpack" rel="noreferrer">https://github.com/angular/angular-cli/tree/webpack</a></p>