// ...
entry: {
pageA: './src/pages/pageA.js',
pageB: './src/pages/pageB.js',
pageC: './src/pages/pageC.js',
pageD: './src/pages/pageD.js',
vendor: ['lodash', 'moment', 'marked'],
},
plugins: {
new webpack.optimize.CommonsChunkPlugin({
name: ['vendor', 'manifest'],
})
}
// ...
According to the official webpack2 documentation, through the above configuration, the third-party library can be extracted to vendor.js. So how to extract the custom public packages used in pageA, pageB, pageC, and pageD?
/a/11...