It seems like this PR broke the types for EnvironmentPlugin. According to docs, both undefined and null are accepted as values (and have different behavior), however with this change it is no longer allowed to pass null: (playground link)
Originally posted by @jtbandes in #18647 (comment)