It can be convenient to define a vendor entry based on package.json dependencies. Load the file first using const pkg = require('./package.json'); and then do vendor: Object.keys(pkg).
It should be either pkg = require('./package.json').dependencies or vendor: Object.keys(pkg.dependencies) right?
http://survivejs.com/webpack/building-with-webpack/splitting-bundles/
It should be either
pkg = require('./package.json').dependencies
orvendor: Object.keys(pkg.dependencies)
right?