I have followed the steps from this document, to setup bundling & minification in my local instance.

It works with & without executing the last two steps, which are:

Adding the remove attribute for the bundle

   <remove name="BundleModule"/> 
   <add type="System.Web.Optimization.BundleModule" name="BundleModule"/>

Adding a setting to ignore url prefixes:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
      <setting name="IgnoreUrlPrefixes" value="(all other sitecore paths here)|/bundles"/>

Please help me understand what do they do and if they are mandatory.

1 Answer 1


Adding the remove attribute for the bundle

Modules from the <modules> section of web config are processed and combined in top-down order (starting from the server-specific modules). Some modules may possible be already configured on a higher level, so it's a place for potential conflicts.

It's a recommended practice to remove modules before adding your own to avoid conflicts.

Adding a setting to ignore url prefixes:

IgnoreUrlPrefixes can be used to prevent Sitecore from processing specific requests. There is absulutely no point in Sitecore trying to e.g. resolve item from a bundle url. That's why you should add you custom bundle url to IgnoreUrlPrefixes

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.