You can check out the webpack configuration files from mern-starter, they showcase a lot of bells and whistles.
I usually don't webpack my backend code, don't use CommonChunksPlugin (my apps usually have single entry point with many split points) and have a single config file (conditioned by environment variables) but the outcome is very similar.