I have a Node_modules which uses CSS and Script file in it.
There are two ways to load these resources.
Using in node_modules will it increase main and style bundles size???
I am the little bit confused about which one should be used, guys please give your opinion.
Matt Strom
Software Engineer, TypeScript ninja
The recommended approach is to use NPM modules along with Webpack. This is the method that is used by the Angular CLI by default. Using <script> tags would be very tedious. Some packages might not even export web compatible modules.
Webpack will bundle and optimize all of the NPM modules and stylesheets together into just a few files. It is also compatible of tree shaking which removes code paths that are not used further reducing your bundle size.