Saturday, 22 September 2012

Disabling / turning off the bundling of js and css resources in the Grails resources plugin

I'm using the Grails resources plugin, which is great because you don't have to worry about including it in every page. However, by default it bundles all of your javascript into one big file. If you are using a whole bunch of plugins, troubleshooting that big file can be a daunting task. There is an easy to do this actually:


 modules = {  
      application {  
           defaultBundle false  
           dependsOn 'jquery'  
           resource url: "css/bootstrap/bootstrap.css"  
 ...  
Using the defaultBundle method will allow you to disable the auto-bundling feature.

No comments:

Post a Comment