Bundler won't include a ".min.js" file unless there's also a regular ".js" file


  1. Create a file foo.min.js with arbitrary code in it but do NOT have a foo.js file
  2. Add it to a bundle (possibly with other items)
  3. Create a site that calls Scripts.Render("~/mybundle")
  4. Run the page in either debug or release (but it's easier to see in debug)
The foo.min.js reference isn't included

The foo.min.js reference should be included despite not having a non-minified version.

My app has many files that for legacy reasons have arbitrary filenames that for a variety of reasons must not be changed. Some of those files are already minified, but I still want to bundle them.
Closed Mar 12, 2013 at 9:50 PM by


eilonlipton wrote Feb 12, 2013 at 11:08 PM

I am using Bundling

My config looks something like this:
        bundles.Add(new ScriptBundle("~/scripts/jqueryplugins").Include(
So, some files were always min-only (I don't have a non-.min version), and they were included explicitly.