a plugin to help webpack to remove chunk's entry code
npm install webpack-remove-chunk-entry --save-dev
const RemoveChunkEntryPlugin = require('webpack-remove-chunk-entry');
plugins: [
new RemoveChunkEntryPlugin({
chunks: ['lib']
})
]