The app exceeded the memory limit during build

My project HMDWATest node.js project is quite small in terms of how much code I have. But I seem to have now hit a limit during build. Most of the time my builds fail with:
The app exceeded the memory limit. Stopping and pausing for 15 seconds.

Short of splitting up my project into some more modules, which I plan to do anyways, are there instructions/links/ways to debug what is happening with memory usage during build so I can figure out exactly where the issue is?