This project has moved. For the latest updates, please go here.

A Non-minifying bundle

Jun 18, 2013 at 11:47 PM
I am wondering if there is any bundler implementation that can server all of the javascript in a non minified bundle.

I have an embedded widget that loads a script with all of the functionality so I can only load one script onto the page to implement my logic and I am using a Bundle to handle the combining of the files but in a dev environment I would like to debug against a non minified version of the bundle. Are there any of the bundlers that can be used that will still combine the files but not minify them.
Jun 19, 2013 at 8:37 AM
You need this only for debugging?
Jun 21, 2013 at 4:04 AM
I was wondering almost the same thing.

How do you guys are doing for debug and at production bundle and minify the js because
In order to debug I am using this code on the page
<script src="Scripts/Model/Product.js"></script>
<script src="Scripts/ProductsController.js"></script>
<script src="Scripts/AppView.js"></script>
but at production I have to bundle and minify so I use something linke this

<script src="Scripts/Model/js"></script> // and this joins the 3 files minified

the thing is I am sure that there is a simpler way of doing that because I have to manually change every build.

Unfortunately I did not see any tutorial or anybody talking about that, how can I do this ?
Jun 23, 2013 at 2:34 PM
Before starting work with the Bundle Transformer learn how to work with Microsoft ASP.NET Web Optimization Framework.

I recommend you start from reading chapter “Bundling and Minification” of the ASP.NET MVC 4 tutorial. And then you can already proceed to read the Bundle Transformer documentation.
Jun 24, 2013 at 5:15 PM
So just to wrap this up I found I was able to get the desired effect, that is of having a non-minified bundle by clearing out all the transformations on the bundle.


Jun 24, 2013 at 5:50 PM
You didn't try just switch web application to debug mode?
        <compilation debug="true" targetFramework="4.0" />
BundleTable.EnableOptimizations = false;
Jun 24, 2013 at 5:57 PM
Not make sense to use the following code:
When you can create a bundle as follows:
var myBundle = new Bundle("~/myBundle");
It seems to me that you don't read the documentation.