Reputation: 2499
We're having trouble including breeze.debug.js in our BundleConfig.cs. After adding it in BundleConfig, it never gets downloaded to the browser (as seen - or not seen, in this case - in the Network tab of the browser's dev tools). And, we always get an error - Uncaught Error: Can't find breeze from breeze.angular.js:90 - which is loaded in BundleConfig right after breeze.debug.js.
We've seen this question:
New ScriptBundle .Include not working for breeze.min.js New ScriptBundle .Include not working for breeze.min.js
but none of the 'answers' work.
We've tried:
Here is our BundleConfig.cs:
bundles.Add(new ScriptBundle("~/bundles/thirdparty")
.Include("~/Scripts/jquery-{version}.js")
.Include("~/Scripts/jquery-ui-{version}.js")
.Include("~/Scripts/angular.js")
.Include("~/Scripts/angular-animate.js")
.Include("~/Scripts/angular-route.js")
.Include("~/Scripts/angular-sanitize.js")
.Include("~/Scripts/bootstrap.js")
// breeze.debug.js doesn't work in BundleConfig.cs!!!
//.Include("~/Scripts/q.js") // we've tried with q.js and without q.js - neither works
.Include("~/Scripts/breeze.debug.js")
.Include("~/Scripts/breeze.angular.js")
.Include("~/Scripts/toastr.js"));
Bottom line is BundleConfig downloads all other scripts to the browser without any problems. It's only breeze.debug.js that never gets downloaded. And, by the way, we're using the latest versions of breeze (all scripts actually).
So, help?! What needs to be done to be able to add breeze.js to BundleConfig.cs and actually have it work?
Thanks.
Upvotes: 0
Views: 238
Reputation: 17863
I'll bet the problem is the word "debug" in the name "breeze.debug.js". As I recall, ASP.NET bundling excludes any file with that word in its name from production bundles.
Here's a StackOverflow thread on this topic.
I wish I remembered the exact incantation. I don't use bundling anymore myself but I got it to work a while back. You may have to do a little digging and messing around to get this just right. It does work.
Upvotes: 2