Correct, the particular system I encountered this minification issue has an Ant-based build (which calls r.js for concatenation and minification).
I'll have to check on your compile suggestion. I tried lots of things, including using the postLink etc. Do you have an example?