使用dep在不同环境下的不同依赖

How can I ensure that I use different dependencies depending on the environment/build? For example, I do not want to include some dependencies required for the testing environment in my production build?