根据如下命令对项目进行打包: html
npm run build
命令执行完出现vue
DONE Build complete. The dist directory is ready to be deployed.
INFO Check out deployment instructions at cli.vuejs.org/guide/deplo…
看了一下,build complete,嗯完成了,后面的也没有看,直接打开了生成的dist文件夹下的index.htmlnpm
打开后出现一个空白页面,而且控制台是上面这样的。 ide
解决办法:ui
执行下面命令:code
npm install http-server -g 全局
而后在dist文件下执行:server
http-server
直接打开上面的网址访问就能够了。