Vue CLI build and run index.html file without server

后端 未结 3 1295
Happy的楠姐
Happy的楠姐 2021-02-05 10:45

I\'m using the latest vue-cli version 3.0.

My current issue is that whenever I run npm run build the files generated in the dist f

3条回答
  •  悲哀的现实
    2021-02-05 10:49

    You can use the http-server module

    npm install http-server -g
    http-server dist/
    

    normally the server starts at port 8080 so you can serve the build app on http://localhost:8080

提交回复
热议问题