I think you can try bare webpack first, if the problem persists then maybe make a move.
Hi, I have experienced this for rather large projects. Node’s heap memory allocation is 1.76Gb by default at least on my mac.
On my mac I override this by setting the environment variable
Docs say you can raise it up to 8192.
Maybe that is it, I am working with a semi large project and it will only get larger at this point. Thanks