<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bundling and Minification</title><link>http://asp.net</link><pubDate>Mon, 03 Sep 2012 10:54:47 GMT</pubDate><generator>umbraco</generator><description>Comments for Bundling and Minification</description><language>en</language><atom:link href="http://asp.net/rss/comments/39127" rel="self" type="application/rss+xml" /><item><title>Comment Posted by fogjuice</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 14 Jun 2012 16:57:38 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015766</guid><description><![CDATA[ <p>Rick, you create great readable and interesting tutorials.  Thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/fogjuice.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by prithvi_be@yahoo.com</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 14 Jun 2012 17:19:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015767</guid><description><![CDATA[ <p>Nice tutorial. Thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/prithvi_be@yahoo.com.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by alexdresko</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 14 Jun 2012 17:58:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015768</guid><description><![CDATA[ <p>Do bundle names have to look contain the path for which the included files are contained? For example... new StyleBundle(&quot;~/Content/themes/base/css&quot;). Is there a reason you specified &quot;~/Content/themes/base/css&quot; for the name? If not, that&#39;s VERY confusing. It makes it look like &quot;~/Content/themes/base/css&quot; is somehow important to the name of the bookmark. It&#39;s also very ugly because it duplicates the same path that is repeated multiple times in the .Include(...) call. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/alexdresko.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by alexdresko</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 14 Jun 2012 18:00:49 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015769</guid><description><![CDATA[ <p>Also, I don&#39;t fully understand how the Script/Style.Render methods could be involved with a routing conflict yet, but it seems like I should just be able to do something like Script.Render(&quot;jQuery&quot;) and have it render my jQuery bundle. No paths or conventions necessary there. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/alexdresko.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Taritsyn</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Fri, 15 Jun 2012 04:06:08 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015773</guid><description><![CDATA[ <p>I recommend to try Bundle Transformer (<a rel="nofollow" href="http://bundletransformer.codeplex.com" target="_blank">bundletransformer.codeplex.com</a>) - a modular extension for the product described above (Microsoft ASP.NET Web Optimization Framework). It supports translation of code on intermediate languages (LESS, Sass, SCSS and CoffeeScript). In addition to it, there are minifier-adapters based on Microsoft Ajax Minifier, YUI Compressor for .NET, Google Closure Compiler and Douglas Crockford JSMin.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/Taritsyn.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jnappi</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Fri, 15 Jun 2012 16:48:38 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015780</guid><description><![CDATA[ <p>Maybe I&#39;m stating the obvious or missing something but bundling doesn&#39;t seem to be compatible with using cookieless domains or CDN.  If my www.mydomain.com has javascript files on js.mydomain.com, then I can&#39;t really bundle them.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/jnappi.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Fri, 15 Jun 2012 18:59:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015781</guid><description><![CDATA[ <p>alexdresko: Do bundle names have to look contain the path for which the included files - The reason the CSS path needs to be the same is due to the CSS containing relative paths.  It won’t work if the location of the bundle is different from the actual CSS files in this case. </p><p></p><p>alexdresko: Script/Style.Render</p><p>The Render helpers are URL render helpers and they are not limited to bundles - </p><p>Scripts.Render(“jquery”) would turn into <a rel="nofollow" href="http://yourhost.com/yourapp/jquery" target="_blank">yourhost.com/</a></p><p></p><p>We only are able to resolve it to be a bundle if you pass in the effective bundle url (~/&lt;bundlepath&gt;)</p><p></p><p>fogjuice &amp; prithvi_be@yahoo.com : Thanks, I&#39;m glad you found it useful.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Fri, 15 Jun 2012 19:00:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015782</guid><description><![CDATA[ <p>Taritsyn - I recommend to try Bundle Transformer (bundletransformer.codeplex.com) - Thanks for posting this.</p><p></p><p>jnappi - bundling doesn&#39;t seem to be compatible with using cookieless domains or CDN. </p><p>Correct. We are considering bundling jQuery and other assets on our CDN in the future.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by alexdresko</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Sun, 17 Jun 2012 20:36:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015793</guid><description><![CDATA[ <p>I think your answer to my questions was just about as cryptic as my questions. :) I think more needs to be done to explain how bundling/minification works, as well as the API behind it.  Last I checked, documentation on MSDN wasn&#39;t quite where it needs to be related to this stuff. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/alexdresko.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ARJindal</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 25 Jun 2012 13:56:14 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015844</guid><description><![CDATA[ <p>It also ignore the files that ends with .debug-</p><p></p><p>public void AddDefaultIgnorePatterns()</p><p>{</p><p>    this.IgnoreList.Ignore(&quot;*.intellisense.js&quot;);</p><p>    this.IgnoreList.Ignore(&quot;*-vsdoc.js&quot;);</p><p>    this.IgnoreList.Ignore(&quot;*.debug.js&quot;);</p><p>}</p><p>This creates problem with bundling knockout-2.1.0.debug.js , any option to overwrite this ignore list?</p><p></p><p> </p><p></p><p> </p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ARJindal.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Tue, 26 Jun 2012 20:53:21 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015861</guid><description><![CDATA[ <p>@ARJindal : This creates problem with bundling knockout-2.1.0.debug.js , Why do you want the debug version of knockout when you release. The released version will use knockout-2.1.0.js</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ARJindal</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Wed, 27 Jun 2012 13:08:34 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015865</guid><description><![CDATA[ <p>@ricka6,  It should be handle by the configuration, in debug configuration it should allow me to include .debug files also.</p><p></p><p>As quoted in this article itself -  [ this means with a  debug configuration, the file jquery-1.6.2.js will be added to the bundle. In a release configuration,  jquery-1.6.2.min.js will be added.]</p><p></p><p>I agree that in release mode it should use knockout-2.1.0.js, but in debug mode it should bundle anything except .min, .intellisense and .vsdoc files. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ARJindal.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Wed, 27 Jun 2012 14:38:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015868</guid><description><![CDATA[ <p>@ARJindal - Thanks for point this out. It has been fixed for RTM. Right now rename              </p><p>   knockout-2.1.0.js            --&gt; knockout-2.1.0.min.js  </p><p>  knockout-2.1.0.debug.js  --&gt; knockout-2.1.0.js  </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by techstyled</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 05 Jul 2012 20:20:55 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015926</guid><description><![CDATA[ <p>&quot;bundling doesn&#39;t seem to be compatible with using cookieless domains or CDN&quot;</p><p></p><p>All this great and wonderful work, that makes using best practices for web optimization better... and then they go and ignore 2 _very_ important web optimization best practices...</p><p></p><p>I guess we can hope for these to be implemented soon and just continue to roll our own until then...</p><p></p><p>Sad panda... so close to being so good but... nope, completely useless to me because I use both of these important optimization&#39;s.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/techstyled.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 09 Jul 2012 12:51:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015946</guid><description><![CDATA[ <p>Providing more robust CDN support is in the next batch of work that we’re planning right now.  Thanks for the input.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Murk59</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Wed, 18 Jul 2012 04:24:18 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015998</guid><description><![CDATA[ <p>Is there any way to easily alter the rendered url(s) ?</p><p>I&#39;d like to have a fully qualified url (&quot;<a rel="nofollow" href="http://mysite.com/Content/style/Css" target="_blank">mysite.com/</a>&quot;) in order to add a subdomain (&quot;<a rel="nofollow" href="http://static.mysite.com/Content/style/Css" target="_blank">static.mysite.com/</a>&quot;).</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/Murk59.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by moattarwork</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 19 Jul 2012 06:23:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016010</guid><description><![CDATA[ <p>Quite fine article. Thank you for fine and precise explanation.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/moattarwork.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by idof</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Sat, 21 Jul 2012 16:38:23 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016025</guid><description><![CDATA[ <p>I don&#39;t see a way to control the URL created when using Scripts.Render() to add server prefixes, such as CDN host names - the bundle url is always created as &quot;/bundles/...&quot; without the option to change it to &quot;http://cdnserver/myapp/bundles/...&quot;.</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/idof.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka0</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 23 Jul 2012 02:23:36 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016031</guid><description><![CDATA[ <p>@Murk59 -- Is there any way to easily alter the rendered url(s) ?</p><p>Yes - Use @Scripts.Url(&quot;your bundle&quot;) to create the URI (not all the markup including the script tag) - then you can modify the URI. The RTM version will have more features to support URI generation.</p><p>@idof CDN -- CDN&#39;s will be supported for RTM. I hope to update this article soon after RTM</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/ricka0.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by johnny_reilly</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Thu, 16 Aug 2012 06:40:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016185</guid><description><![CDATA[ <p>Hi Rick,</p><p></p><p>Great stuff - can we use this with MVC 3 / ASP.NET 4.0?</p><p></p><p>I&#39;m guessing the answer is yes with this: <a rel="nofollow" href="http://nuget.org/packages/Microsoft.AspNet.Web.Optimization" target="_blank">nuget.org/</a></p><p></p><p>?  Hope so!</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/johnny_reilly.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by dirq</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 20 Aug 2012 08:57:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016221</guid><description><![CDATA[ <p>Is there a way to automatically minify and combine generated ScriptResource.axd files?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/dirq.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by silverCORE</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 27 Aug 2012 14:29:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016302</guid><description><![CDATA[ <p>Hi Rick.</p><p></p><p>Thanks for the article, certainly extensive. I feel it&#39;d be great to add the following to your post:</p><p></p><p>#1. Convention &quot;Selecting the non “.min” version for debug.&quot;. That should read &quot;On debug, any .min.js will by default be ignored and not bundled&quot;. caused me headaches trying to figure this out.</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/silverCORE.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by silverCORE</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 27 Aug 2012 14:29:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016303</guid><description><![CDATA[ <p>#2. &quot;Bundles should be partitioned by pages that need them&quot;. That should read MUST be partitioned, when talking about css bundles, per this scenario: </p><p></p><p><a rel="nofollow" href="http://www.deliveron.com/blog/post/Be-Careful-When-Bundling-Stylesheets-in-MVC-4.aspx" target="_blank">www.deliveron.com/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/silverCORE.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by dazwilkin</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Tue, 28 Aug 2012 15:32:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016332</guid><description><![CDATA[ <p>I tend to have a bundle of (shared) JavaScript library files and then (HTML) page-specific JavaScript files. Clearly the shared library files get bundles/minified but it seems overkill to create a bundle for each of the page-specific JavaScript files solely to get them minified. Am I missing something or is this the best practice?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/dazwilkin.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by corydeppen</title><link>http://asp.net/mvc/tutorials/mvc-4/bundling-and-minification</link><pubDate>Mon, 03 Sep 2012 10:54:47 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016371</guid><description><![CDATA[ <p>I think the docs really need to be rewritten in places where you make it look completely acceptable to define bundles with random relative paths (e.g. new ScriptBundle(&quot;~/bundles/jquery&quot;)). While it works, it&#39;s far from a best practice, considering any relative paths in CSS will fail if the bundle doesn&#39;t maintain the same structure. I think it would be better to just mention that the relative path to bundles should always match the relative path to those resources. Consistency goes a long way.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/corydeppen.jpg?forceidenticon=false&amp;dt=635049565200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>