1. Packaging and publishing projects
1.1 Packaging:
npm run build
Error:
The reason: the original eslint is a grammar checker, but very strict limitations, in which a lot of my vue file space will lead to the red line (the red line prompts can be turned off), although you can turn off, but always jump out at compile time, they are able to Close is the best
Solution: In the build / webpack.base.conf.js file, or delete the comment: module-> rules in the rules relating to eslint:
Re-run npm run build
1.2 Release 1: Use static server toolkit
npm install -g serve (there is a static server serve)
serve dist (Command: Run dist folder)
Visit: http: // localhost: 5000
1.3 Published 2: Dynamic web server (tomcat)
Modify the configuration: webpack.prod.conf.js
output:{
// Add the following configuration xxx is the project name, such as: / vue_demo /
publicPath: '/ xxx /' // package name of the folder
}
Repackaging:
npm run build
Modify the dist folder for Project Name: xxx
Webapps directory to xxx (file folder renamed after the dist folder) to copy the running tomcat
Then visit; http: // localhost: 8080 / vue_demo
1.4 page views dynamic publishing screenshots