3
votes

I am using https://github.com/AngularClass/angular2-webpack-starter as seed project and it's awesome.

But i can't understand how to include third party JS lib in my project using Webpack. I know it can be done using <script src="third/party"></script> But i want to do it in angular way like import { ThirdParty } from 'third-part/';

And Also please suggest the standard way to use javascript library in angular2 project using webpack.

1

1 Answers

1
votes

Place the import statement in your src/vendor.ts file, this should do the trick.

if not, you may have to resort to the <script></script>