[Vuejs]-How to config my webpack.config.js to extract these dependances?

0👍

You can create two new instances of CommonsChunkPlugin and make them like this

new webpack.optimize.CommonsChunkPlugin({
   name: 'vue',
   minChunks: function(module, count) {
     return  module.resource && (/vue/).test(module.resource)    
   }
}),
new webpack.optimize.CommonsChunkPlugin({
   name: 'jquery',
   minChunks: function(module, count) {
     return  module.resource && (/jquery/).test(module.resource)    
   }
}),

Leave a comment