webpack packaged and released project

1, packing: npm run build

2, Published:

1) using a static server toolkit

npm install -g serve

serve dist

Visit: http: //www.localhost.5000

2) use dynamic web server (Tomcat) [understand! ]

   1. Modify configuration: webpack.prod.conf.js

    output:{

      When the name of '/ vue_demo /' -----> published article: buildPath

    }

    2. Repackaging: npm run build

     Modify the dist folder for Project Name: xxx

     Xxx copied to the running Tomcat webapps directory

     Visit: http: //www.localhost: 8080 / xxx

 

Guess you like

Origin www.cnblogs.com/sylys/p/11704166.html