I need to write more doc about how to minify and keep the injection from falling apart. But for now, here are some information.
The tool used to minify usually rename all variables, it can a problem with dependency injection frameworks, such as soma.js or angular.
If you are using uglify which is probably the most common tool, you can use an option called "mangle", which can either be set to false not to rename any variables, or can take an array of exception as a parameter.
See the --no-mangle option:
If you are using Grunt, it is even easier:
Here is an example with the soma-template plugin, where the 2 injection names "injector" and "instance" are protected:
I suggest you turn the option to false (mangle: false, no array), and optimize with a list of exception at a later point.