you can separate third-party library dependencies from your business code when webpack configures entry. Please refer to the official Document
the following is some of the configurations in a project I have done. For reference only!
entry: {
"vendor1": ["event-source-polyfill", "babel-polyfill", "vue", "vue-router", "vue-cookie", "vuex", "axios"],
"vendor2": ["element-ui"],
app: 'src/main.js'
},
< hr >
find a blog , which is more able to answer the questions of the subject. It is suggested that the subject should first Google and then Baidu. If it can't be solved, ask the question again.
basic common components, such as vue-resource, vue-router, axios, and vue-core, are all packaged into vendors and are not packaged when there is no version change.
yarn is recommended for packaging.
if yarn has a cache and local node_modules, the packing speed is above the normal speed of 10x