I extremely recommend choosing a detergent made particularly for cloth diapers. These products are made just to deal with the problems that can happen when washing cloth diapers. However, you do not have to use these. If you choose not to, here are some things to look for when choosing cloth diaper harmless detergent.
1) Nearly all common laundry detergents contain "optical brighteners" - tiny particles that stick to the surface of your clothes, giving the result of brighter colors. What does this mean for your diapers? Chemical remains are being left behind which can cause you diapers to fend off or cause skin irritation.
2) Enzymes in your laundry detergent are made to corrupt protein molecules. This can be good for removing stains, but when the enzymes are not appropriately rinsed from diapers (or clothing), they will actually "eat" away at skin.
3) Most don't know this, but synthetic fragrances are made from petroleum.
4) Although chlorine bleach is great for killing germs, you won't want to use it on your cloth diapers. Not only reduce their toughness and absorbency, but it will also eat away at the fibers of your diapers.
5) When buying detergent, remember that liquid requires more additives than powder to keep it in liquid deferral.
6) Stay away from any detergent that contains real soap. It will leave a residue on your diapers that can cause them to repel dampness.
7) Detergents that normally known to cause problems for cloth diapers are: Arm & Hammer Fabricare, Arm & Hammer Sensitive Skin, Cheer, Gain, Melaluca MelaPower, Nature Clean, SA8, The Laundress, Tide HE.
If you have been using a detergent that has caused build up and then change to a new detergent that is fine for cloth, then you may have issues. You need to do a good stripping on the diapers to remove all of the buildup. Otherwise you may find your diapers becoming stinky or start to repel.