It is still possible to compile on RPI3 if you increase the swap file size. 2GB should do the trick. I had to do it for RPI3B+ that would usually crash HA when I tried to compile in esphome.
How to increase swap file size
It is still possible to compile on RPI3 if you increase the swap file size. 2GB should do the trick. I had to do it for RPI3B+ that would usually crash HA when I tried to compile in esphome.
How to increase swap file size