8

I created some theme HtmlHelper extensions for that grab the .css and .js files in a theme directory and dynamically register them as bundles. However, if the theme only contains .min.js files, the Scripts.Render output is empty in debug mode.

Is there a way to include *.min.js files in the output for Scripts.Render when in debug mode?

1
  • I think this has be files a bug with Optimization... Commented Mar 11, 2013 at 15:58

2 Answers 2

15

Figured it out.

BundleTable.Bundles.IgnoreList.Clear(); // apparently, IgnoreList included .min.js in debug
BundleTable.Bundles.IgnoreList.Ignore(".intellisense.js", OptimizationMode.Always);
BundleTable.Bundles.IgnoreList.Ignore("-vsdoc.js", OptimizationMode.Always);
BundleTable.Bundles.IgnoreList.Ignore(".debug.js", OptimizationMode.Always);
Sign up to request clarification or add additional context in comments.

1 Comment

For a more in-depth explanation, check out this SO answer.
1

Faced same problem earlier......all i did was to upgrade the asp.net web optimization to the latest alpha version.

1 Comment

this crashed mine on dev machine had to add this bundles.DirectoryFilter.Clear(); to BundleConfig.cs fiel to fix dev machine, this however did not fix my live machine yet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.