The JavaScript Breeze Client NuGet package has an unusual JavaScript file pairing: there is a breeze.min.js and a breeze.debug.js. More typical is foo.js and foo.min.js, which is straightforward to use with ASP.NET bundling and minification: just include foo.js in the bundle, and by default, ASP.NET will use foo.min.js in production.

However, it's not clear what to do with breeze.debug.js. Should I include it in the bundle so I have access during development to any special debug code it contains? But then what about production? Will ASP.NET pick up the .min.js file, or will it minify the .debug.js file, in which case any debug code in the file would make it into production?

有帮助吗?

解决方案

Include both breeze.debug.js and breeze.min.js. According to the description of the Angular SPA template, Web Optimization will remove one or the other. Which one it removes depends on the debug setting in web.config, which by default is determined by the build configuration.

其他提示

Well, you can configure IgnoreList for bundling based on whether it is debug mode or not:

BundleTable.Bundles.IgnoreList.Ignore(".debug.js", OptimizationMode.WhenEnabled);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top