3

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.

striker_axel
  • 195
  • 1
  • 10
  • These links should help you: http://stackoverflow.com/questions/35638027/angular2-webpack-typescript-3rd-party-libraries http://stackoverflow.com/questions/35166168/how-to-use-moment-js-library-in-angular-2-typescript-app/36290343#36290343 – norweny Jul 05 '16 at 09:11

1 Answers1

1

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>

Colum
  • 996
  • 2
  • 8
  • 23