When I publish my MVC web app I can see that the published location gets the original js and css files, it does get minified when I run it (I can see it in view source)
This is what I'm doing:
BundleTable.EnableOptimizations = true;
bundles.UseCdn = false;
var cssTransformer = new StyleTransformer();
var jsTransformer = new ScriptTransformer();
var nullOrderer = new NullOrderer();
var cssBundle = new StyleBundle("~/bundles/css");
cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
cssBundle.Transforms.Add(cssTransformer);
cssBundle.Transforms.Add(new CssMinify());
cssBundle.Orderer = nullOrderer;
bundles.Add(cssBundle);
var sampleCssBundle = new StyleBundle("~/bundles/sampleCss");
sampleCssBundle.Include("~/Content/sample.css");
sampleCssBundle.Transforms.Add(cssTransformer);
sampleCssBundle.Transforms.Add(new CssMinify());
sampleCssBundle.Orderer = nullOrderer;
bundles.Add(sampleCssBundle);
var sampleJsBundle = new ScriptBundle("~/bundles/sampleJs");
sampleJsBundle.Include("~/Scripts/sample.js");
sampleJsBundle.Transforms.Add(jsTransformer);
sampleJsBundle.Transforms.Add(new JsMinify());
sampleJsBundle.Orderer = nullOrderer;
bundles.Add(sampleJsBundle);
will I get a better performance if I deploy a minified version of the files to the published location? (for example: myFile.min.js and myFile.min.css)
is there a native way to generate the files in Visual Studio so I can publish it minified? (I could view each minified file and save it as myFile.min but I like to have an automated way to do it)
Thanks in advance.