survivejs / webpack-book

From apprentice to master (CC BY-NC-ND)
https://survivejs.com/webpack/
2.42k stars 319 forks source link

[Mistake] Splitting Bundles - Object.keys(pkg) #76

Closed vjancik closed 8 years ago

vjancik commented 8 years ago

http://survivejs.com/webpack/building-with-webpack/splitting-bundles/

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?

bebraw commented 8 years ago

Correct. Thanks for pointing this out. I'll get it fixed for the next release.