Disentangling processes governing the formation and evolution of galaxies is a fundamental challenge in extragalactic research. In this sense, the current belief that galaxies grow by the action of minor mergers makes the study of the stellar mass-size relation in different environments an important tool for distinguishing effects of internal and external processes. The aim of this work is to study the effects of environment on the growth in size of galaxies. As part of Analysis of the Interstellar Medium of Isolated GAlaxies (AMIGA project), we examine the stellar mass-size relation for a sample of the most isolated galaxies in the local Universe interpreted as stellar systems where evolution has been mainly governed by internal processes. Effects of environment on the stellar mass-size relation are evaluated by comparing our results with samples of less isolated early- and late-type galaxies, as well as, for the first time, different spiral subtypes. Stellar masses in our sample were derived by fitting the SED of each galaxy with KCORRECT. We used two different size estimators, the half-light radius obtained with SEXTRACTOR and the effective radius calculated by fitting a S'ersic profile to the i-band image of each galaxy using GALFIT. We found good agreement between those size estimators when the S'ersic index fell in the range 2.5 < n < 4.5 and 0.5 < n < 2.5 for (visually classified) early- and late-type galaxies, respectively. We find no difference in the stellar mass-size relation for very isolated and less isolated early-type galaxies. We find that late-type isolated galaxies are ~1.2 times larger than less isolated objects with similar mass. Isolated galaxies and comparison samples were divided into six morphological ranges (E/S0, Spirals, Sb, Sbc, Sc and Scd-Sdm) and five stellar mass bins between log (M*) = [9,11.5]. In all cases, the relation is better defined and has less scatter for the isolated galaxies. We find that as the morphological type becomes later the galaxy size (for a fixed stellar mass range) becomes larger. For the lowest stellar mass bins log (M*) = [9,10], we find good agreement between sizes of AMIGA and comparison spirals (both mostly composed of Scd-Sdm types). The isolated spiral galaxies in the high stellar mass bins log (M*) = [10,11] tend to be larger than less isolated galaxies. This difference in size is found for all spiral subtypes and becomes larger when we compare fully isolated galaxies with galaxies having two or more satellites (neighbours within 3 mag of difference at a distance less than 250 kpc from the galaxy). Our results suggest that massive spiral galaxies located in low-density environments, both in terms of major companions and satellites, have larger sizes than samples of less isolated galaxies. Hence, the environment has played a role in the growth in size of massive spiral galaxies.