Force package dependencies as optimized builds?

I also want to be able to do this, and I think it's a common need. The only way I've found is to clone the dependency and add it as a local package, then modify it. Not a great experience.