moving webpack config to middleware def function, otherwise it runs webpack when grunt is evaluated.