Define what you mean by "enough"?
Do you mean "enough so that builds don't fail?"
Or "enough so that builds complete in an acceptable timeframe"?
And/or "enough so that the UI isn't laggy, and I can work in an editor/browse the web/read email during a build without sluggishness?
It depends on your expectations and your toolchain.
Frontend development typically has a short/simple toolchain. All you really need is a good editor suitable for the task, some little "toy" web server, perhaps some tools for minifying Javascript/CSS (and perhaps a Sass compiler) for production builds, and during development you typically wouldn't even use that.
Backend development might often need no more than front-end development. Or might need quite a bit more. For example, I use PostgreSQL as a database. So, I have a local instance for development/test. I run pgAdmin4, which runs in a Docker container. You might need to run a VM that replicates your backend environment. The GB add up.
Native app development is often done with minimal tools. For basic iOS app development, you need nothing more than Xcode. OK, and the iOS simulator. If you are doing some sort of hybrid, cross-platform development, probably add additional toolchain components - and of necessity Android SDKs and build tools. Android development uses a different compiler. Add another simulator. (I use GenyMotion, since both approaches provided by Google are slow as molasses.) Any decent Android simulator runs in a VM.
Oh, need to test that website on Windows? Add a Windows VM.
So many tools today run in a container or a VM. That adds to memory requirement.
Get as much memory as your budget can stand. I think, though, 64GB is the practical bound today for most development. I recently got an iMac Pro with 64GB for development. I use a big tool set. I've been checking Activity Monitor, and I find that I haven't used a swap file yet. But once all the tools are loaded up, I am using somewhere between 32GB and 64GB, typically 40-50GB. But I actually haven't had EVERYTHING loaded up at once yet.
What you have to ask yourself is:
- Is it important for the system to be responsive while building?
- How long of a build cycle are you willing to tolerate?
In front end development, you typically do not have a "build cycle", that is, build/test/repeat. How long are you willing to wait to find out you made a simple mistake that will take a few seconds to correct? 15 minutes? 5 minutes? 1 minute? 30 seconds?
In app development using a compiled language, you always have a build cycle, and it can be significant. I understand that the Swift build cycle is substantially longer than the Objective-C build cycle. (I don't use Swift myself, because I do hybrid development, and the underlying platform code is in Objective-C (Java for Android), C, and C++ - no Swift).
Amount of available RAM will have a significant impact of build cycle time.