By using a smaller slit or pin hole.
There is a limit to this:
The smaller the slit, the less light there is to diffract. There will be a size when not enough light is passed too see the diffraction pattern.
Once the slit width get in the neighbourhood of the wavelength of the light that you are studying, no light will be transmitted at all.
Lies a width of optimal diffraction, while still retaining (some) visibility.