I am newbie to angular2, so far I know 2 ways of adding external css/js into app.
Directly in
index.html- Could be a CDN or local file.
Installing the external npm package using the
npm install <package-name>- Note: Works only if the package is available in NPM
I am trying to use an external js which is not available in NPM as of now. So, will be adding it in index.html
Now, this is a two part question.
- Does adding external links in
index.htmlreduces the build time(anyway it's already super fast) inangular build --prod --aot? - By using any of the two ways of adding external js/css files, will there be any performance impact in browser while using the app or it has no impact on performance?
npm install https://github.com/<GITHUB_USER>/<GITHUB-PROJECT>/tarball/<BRANCH>package.json