Optimizing your web applications and using bundling and minification
As you saw in Chapter 4, Basic Concepts of ASP.NET Core 2.0 - Part 1, we have chosen the community-proven Bower as a client-side package manager. We have left the bower.json
file untouched, which means that we have restored the four default packages and added some references within the ASP.NET Core 2.0 Layout Page to use them:
In today's world of modern web application development, it is best practice to separate client-side JavaScript code and CSS style sheets into multiple files during development. But, having so many files may lead to performance and bandwidth problems during runtime in production environments.
That is why during the build process, everything must be optimized before generating the final release packages, which means that JavaScript and CSS files must be bundled and minified. TypeScript and CoffeeScript files must be transcompiled into JavaScript.
Bundling and minification are two techniques you can use...