How do webpack multi-page dependencies on different third-party libraries be packaged?

at present, according to the introduction of vue and jquery, on mobile and pc, the project wants to introduce these two third-party libraries into different pages through webpack, and at the same time, how to configure other public files into vendor?

vendor configuration:

new webpack.optimize.CommonsChunkPlugin({
    name: "vendor",
    minChunks(module) {
        // any required modules inside node_modules are extracted to vendor
        return (
            module.resource &&
  /\.js$/.test(module.resource) &&
  module.resource.indexOf(
      path.join(__dirname, "../node_modules")
  ) === 0
        );
    }
}),
new webpack.optimize.CommonsChunkPlugin({
    name: "manifest",
    minChunks: Infinity
}),

plugins:[
    new HtmlWebpackPlugin({
        filename: 'index.html',
        template: './index.html',
        inject: true,
        chunks: {
            vue : 'vue '
        }
    }),
    new HtmlWebpackPlugin({
        filename: 'detail.html',
        template: './detail.html',
        inject: true,
        chunks: {
            jquery: 'jquery'
        }
    })
]
Menu