Grails - Redeploy after javascript change
grails, javascript
Solution
To avoid cache issues with the Resources plugin, in all my projects I'm using the config `grails.resources.debug = true` in Config.groovy.
You still use `<r:require modules=""/>` in your GSP, but in development mode the source will show all files included instead of merging them.
Problem
Recently I added conf/ApplicationResources.groovy (using resources plugin) file to my project structure. Here I keep my modules definitions for javascript and css libraries. Before, I was importing libraries with classic `g:javascript` tag. Now every time when javascript code changes (while server is running) I get client side js error saying "Uncaught SyntaxError: Unexpected end of input". So for each javascript change application needs to be redeployed, what I dont want. I have also declared .js files to be excluded from resources plugin pattern, but the problem remains. Any advice/help will be appreciated. Solution from Sérgio Michels that worked: - Add to Config.groovy: "grails.resources.debug = true;"