title: Automatically switching to minified CSS & JS files in different environments
body: <p>I am using ASP.Net MVC 5 and also taking advantage of <code>WebEssentials LESS</code> and <code>bundle</code> features.</p>
  
  <p>WebEssentials is setup to create minified css and js files on save.  This is a feature I want because I can monitor the output and it lowers the application startup time (<em>not using Asp.Net MVC bundles</em>).</p>
  
  <p><strong>How can I automatically get my app to use the minified version of the files when it is deployed without having to manually change the file names?</strong></p>
  
  <p>So, for example, from:  </p>
  
  <pre><code>&lt;link href="somestyles.css" .. &gt; 
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>&lt;link href="somestyles-min.css" .. &gt;
  </code></pre>
  
  <p>I did read that I could combine WebEssentials and Asp.Net MVC Bundles, providing I disabled the minification option in Asp.Net MVC Bundles.  This would then substitute the MIN files in production (<code>web.config [debug="false"]</code>).</p>
  
  <p>Is this my only option or is there a better way to achieve this?</p>