@PhilipDAth has done more of these than I do so maybe he'll have some input.
But I'm pretty sure when you stack the only thing it inherits is the layer 3 routing. I believe the rest of your port configs stay the same but I also make sure to do this in a maint window as to not interrupt stuff.
Adam R MS | CISSP, CISM, VCP, MCITP, CCNP, ITILv3, CMNO If this was helpful click the Kudo button below If my reply solved your issue, please mark it as a solution.
If both switches are in layer 2 mode, you can add it to the stack and the configs will be kept.
From memory, if one of the switches in operating in layer 3 mode the stack will ask you which config you want to keep, and the other switch will loose its layer 3 config. The layer 2 config is retained.