The role of stellar feedback and dark matter in the evolution of dwarf galaxies