1

I've been struggling to get my bundle to resolve my .js files at runtime in release mode i.e. with the <compilation debug="false" targetFramework="4.0" />.

After some hours I chanced changing the name of my .js files to file names with a number. This now works. But I cannot find any documentation on it! is there some explanation?

Here's my bundling code, the last 2 files are mine:

BundleTable.Bundles.Add(new ScriptBundle("~/bundles/topoix").Include(
                    "~/Scripts/jquery-{version}.js",
                    "~/Scripts/JSON.js",
                    "~/Scripts/knockout-{version}.js",
                    "~/Scripts/tp-{version}.js",
                    "~/Scripts/tpmodel-{version}.js"

             ));

This doesn't render the scripts when the file names are ~/Scripts/tp.js, ~/Scripts/tpmodel.js, ~/Scripts/tp.min.js, ~/Scripts/tpmodel.min.js

but does when the file names are

~/Scripts/tp-1.0.0.js, ~/Scripts/tpmodel-1.0.0.js, ~/Scripts/tp.min-1.0.0.js, ~/Scripts/tpmodel-1.0.0.min.js

(the difference being the addition of -1.0.0 to the file names).

Colin Bacon
  • 15,436
  • 7
  • 52
  • 72
learnerplates
  • 4,257
  • 5
  • 33
  • 42

1 Answers1

0

For defaul bundle ignore .min files, so rename the files or use the uncompressed version.

Or add bundles.IgnoreList.Clear();

Bundler not including .min files

Community
  • 1
  • 1
Carlo Moretto
  • 365
  • 4
  • 16