Is there a way to disable certain modules on different environments from settings.php or another means in Drupal 8?

For example, if I am not on prod, I don't want XML Sitemap enabled.

  • This is pretty much covered by the dupe but it could do with some new answers so I stuck a bounty on it – Clive Jan 20 '17 at 19:02
  • Yeah, I just saw it pop up. – Kevin Jan 20 '17 at 19:03

Browse other questions tagged or ask your own question.