In this article we will look into an easy option to do bundling and minification in Asp.Net Core. For those who are new to Bundling and Minification let’s try to understand these concepts.
will change like below after minification.
Bundling and Minification using Gulp
We have variety of options available for Third party tools like Gulp and Grunt can be used to do bundling and minification process. However the problem with this approach is it involves additional steps which are slightly complex.
Using Bundler and Minification Extension
Mads Kristensen has created an extension namely “Bundler and Minifier”, using this we can easily do both bundling and minification in Asp.netCore. You can download the installer for extension from here.
Once you installed the extension, to do bundling and minification all you do is to Right click on the file and then select Bundler & Minifier option.
Once you select the option extension will generate the minified file for us. We can also follow the same process to minify css files as well.