I'm having an issue when BundleTable.EnableOptimizations = true;
is set, the virtual URLs are returning 404s. This happens for both my JS and CSS bundles. Here is an example of a bundle I have:
BundleTable.Bundles.Add(
new StyleBundle("~/css")
.Include("~/ui/basic/foundation.css")
.Include("~/ui/basic/all.css")
.Include("~/ui/basic/print.css")
);
I have tried changing the bundle name/path to random characters to be sure that it was definitely not an existing path. I also tried adding bundle to my modules by:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="BundleModule" />
<add name="BundleModule" type="System.Web.Optimization.BundleModule" />
I have bundling running in the same fashion on another project locally which is all working fine.
If anyone has any ideas what it could be that is causing the issue I would greatly appreciate the help.
PS: the project is sitecore using forms. (Same as the other project which is working fine)