Vuejs is the client language, so the deployment is not required based on NODEJS or other server operating environment, just like other static site way to publish it, the following describes the Vuejs specific release of the process and need to pay attention to the point.
Let's take a look at the final file directory generated by Vuejs:
The specific steps are as follows:
1.vue Project root directory/config/index.js change the resource generation path:
Assetspublicpath: "/project name/" changed to Assetspublicpath: "/"
Fix the problem: index.html resource access is not available, the resource is more than the path of the project name.
2. Use the npm Run build command to build the site , the site is the root directory of the dist file;
3. Solve the problem of 404 when the site refreshes;
To this step when the site has been able to access the normal, can not F5 refresh, refresh time return 404, carefully observe the command will find that the path has become our Vue route inside the "virtual path" is set, so will certainly 404, this time needs to be set on the running server, The access to the path is index.html, this time the site on the spending refresh, such as if I use Nginx proxy, configuration:
Location/{ try_files $uri $uri//index.html;}
More server configurations click: https://github.com/vuejs/vue-router/blob/dev/docs/zh-cn/essentials/history-mode.md
VUEJS Production Environment Deployment