In addition to warning of unused dependencies automatically remove them from the generated modules.