node.js - How to deploy vuejs project on the server?
滿天的星座2017-06-10 09:49:21
0
3
950
vue-cli built environment, http://localhost:8080/comment... access is no problem, I now want to access the same data through http://bxu2348550081.my3w.com..., it is packaging Configure before compilation or configure on the server?
It seems that you are using html5 history mode. When deploying, you need to deal with the access path problem, and then point the website folder to the dist directory.
Just configure a server to point to your dist file
I use nginx
After vue build, just put the files in dist and put them on the server
It seems that you are using html5 history mode. When deploying, you need to deal with the access path problem, and then point the website folder to the dist directory.
Reference https://router.vuejs.org/zh-c...