I have a variety of web applications (PHP, ASP.NET, Angular, and React) hosted under different sub-folders on a single sub-domain on the same server.
I'm currently bundling Bootstrap CSS/JS and jQuery into the ASP.NET and Angular applications, for no other reason than that's the pattern I learned when learning the frameworks from books.
But, of course, I'm using the same CSS across the site for consistent styling. I already have some images, fonts, and CSS customizations sourced from a /resources/ folder (or url component, depending on perspective). Is there any reason not to put shared CSS and javascript libraries there and link to them from ASP.NET or Angular?
In short, and to avoid purely subjective (do this, don't do that...), what are the pros and cons of each of these options:
- Bundle third-party CSS and JS libraries into each app using them.
- Consolidate them into a shared location.
- Neither! Link to a CDN for third-party stuff.
Thanks.