Doom is actually quite easy to build with modern tooling because the source code is already structured to keep the platform-specific parts isolated and the source is mostly vanilla C89 (Doom was developed on NeXT workstations and then 'downported' to DOS).
For instance here's my WASM port of the Doom shareware version. This is a fork of doomgeneric, which itself is a fork of fbDoom - but midway through I noticed that all the abstractions added by fbDoom and doomgeneric are actually not very helpful for a WASM port that should run in browsers, and that I probably would have been better off forking the original source code instead):
Github repo: https://github.com/floooh/doom-sokol
Hosted version: https://floooh.github.io/doom-sokol/