  The stellar initial mass function (IMF) is a fundamental property of star
formation, offering key insight into the physics driving the process as well as
informing our understanding of stellar populations, their by-products, and
their impact on the surrounding medium. While the IMF appears to be fairly
uniform in the Milky Way disk, it is not yet known how the IMF might behave
across a wide range of environments, such as those with extreme gas
temperatures and densities, high pressures, and low metallicities. We discuss
new opportunities for measuring the IMF in such environments in the coming
decade with JWST, WFIRST, and thirty-meter class telescopes. For the first
time, we will be able to measure the high-mass slope and peak of the IMF via
direct star counts for massive star clusters across the Milky Way and Local
Group, providing stringent constraints for star formation theory and laying the
groundwork for understanding distant and unresolved stellar systems.
