Suzaku replied to how to stop enemies spawning in base? December 8, 2022 @ 4:48:45 pm PST
Sources of fire and workbenches will keep mobs from spawning in a small radius around them. See here for a list of items that can help keep enemies outside:
https://valheim.fandom.com/wiki/Player_base
https://valheim.fandom.com/wiki/Player_base
3:13 am, December 9, 2022