Is there a quick way to deploy files after vue is packaged?

when I use vue-cli to build a project, I use npm run dev for packaging and deployment every time, but I always use npm run dev for packaging. Sometimes the project is very large and the packaging is very slow. Is there a good way to deploy files with hot-loaded templates like those when developing?

Jun.09,2021

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

Menu