Extract duplicate code into webpack.common.config