If diffraction is an important issue at small apertures, how are macro lenses made to minimize that?
They aren't and they can't be.
If you are interested in the science there is a series of excellent tutorials on diffraction (and on many other things relevant to photography) at
http://micro.magnet.fsu.edu/primer/lightandcolor/diffractionhome.html (There is a fair bit of science involved, but anyone with some tertiary physics or good secondary school physics and a willingness to work at it should be able to follow).
The skinny is that resolution increases as the aperture gets bigger:
every decrease in aperture reduces resolution. This is a result of the nature of light, and it applies to reflecting as well as refracting imaging systems (which is why astronomers always want bigger telescopes). The catch is that lens aberrations also reduce resolution, and
some aberrations improve as the aperture gets smaller (especially spherical aberration - related to the
cube of aperture - but also coma, astigmatism and field curvature). So as the aperture gets smaller it is a race between more diffraction making the image worse and less aberration making the image better. A "diffraction limited" lens is one with no aberrations, and for practical purposes they do not exist, but folk talk about lenses that are "diffraction limited at f/5.6" and so on, meaning that at f/5.6 the diffraction effect is worse than the aberrations. The bigger the aperture at which the diffraction effect is worse than the aberrations the better corrected the lens.
Close focus means shallow depth of field, so you often need a small aperture to get adequate depth of field, but that is always bad for resolution. Macro photography is a struggle with optical limitations.