0

I make use of the bundling features in MVC4 by calling bundles.EnableDefaultBundles();, this allows me to browse to http://website.com/content/css which outputs a singular file of all the CSS files in the /content directory - great.

The issue is I have the following route which loads a blog post from the DB by title: /post/{anything} and in this case {anything} is css (for arguments sake, I can't change it) so the bundling is getting confused and trying to bundling everything in the post directory, which doesn't exist.

Is there any way to exclude a particular URL format or route from being bundled? I think not calling EnableDefaultBundles() would work but does that mean I would have to create bundles for everything manually?

eth0
  • 4,977
  • 3
  • 34
  • 48

1 Answers1

1

Are you using an old version of the Optimization package? EnableDefaultBundles was removed prior to 1.0. You can still accomplish the equivalent of that method by adding the equivalent js/css DynamicFolderBundles.

Hao Kung
  • 28,040
  • 6
  • 84
  • 93