Home > Development Notes > Bundling and Minification
Bundling and Minification
Minification takes a file and makes its contents as small as possible to minimize download time.
To enable bundling and minification set the EnableBundlingAndMinification key in the /AppSettings.config file to true.
<add key="EnableBundlingAndMinification" value="true" />
Now you need to force the site to restart. You can accompish this by "touching" the /web.config file or recycling your website's app pool.
<link href="/skins/default/css/_skin_bundle?v=DdOwK9UuYy_tJfVen6ZU3oXZqrWxigZsRr6UtfLtYOA1" rel="stylesheet"/>
If you click through to look at the bundled file in your browser you should see that all of the contents are on one really long line.
If you notice one file that is not being bundled and minified make sure to add it to the appropriate bundle.
If you notice minification errors when viewing the output of the minified file there is likely something about your CSS file that .Net minification is failing on. There should be a human readable error in the top of the minified CSS file. @import for example will not minify properly.
filePaths: new