The problem was I the pug-html-loader. It must be fixed to a particular version for unknown reasons. I'm closing this as it is tribal dependency incompatibility / conflicts.