By means of N-body+Hydrodynamic zoom-in simulations we study the evolution of the inner dark matter and stellar mass distributions of central dwarf galaxies formed in halos of virial masses Mv=2-3x10^10 Msun at z=0, both in a WDM and CDM cosmology. The half-mode mass in the WDM power spectrum of our simulations is Mf= 2x 10^10 Msun. In the dark matter only simulations halo density profiles are well described by the NFW parametric fit in both cosmologies, though the WDM halos have concentrations lower by factors 1.5--2.0 than their CDM counterparts. In the hydrodynamic simulations, the effects of baryons significantly flatten the inner density, velocity dispersion, and pseudo phase-space density profiles of the WDM halos but not of the CDM ones. The density slope measured at ~ 0.02xRv, alpha, becomes shallow in periods of 2 to 5 Gyr in the WDM runs. We explore whether this flattening process correlates with the global SF, Ms/Mv ratio, gas outflow, and internal specific angular momentum histories. We do not find any clear trends but when alpha is shallower than -0.5, Ms/Mv is always between 0.25 and 1%. We conclude that the main reason of the formation of the shallow core is the presence of strong gas mass fluctuations inside the inner halo, which are a consequence of the feedback driven by a very bursty and sustained SF history in shallow gravitational potentials. Our WDM halos, which assemble late and are less concentrated than the CDM ones, obey these conditions. There are also (rare) CDM systems with extended mass assembly histories that obey these conditions and form indeed shallow cores. The dynamical heating and expansion processes, behind the DM core flattening, apply also to the stars in a such a way that the stellar age and metallicity gradients of the dwarfs are softened, their stellar half-mass radii strongly grow with time, and their central surface densities decrease.