vue-cli打包后如何运行

参看博客:https://blog.csdn.net/u014054437/article/details/79981307#commentBox

执行npm run build进行打包,生成dist文件夹,直接打开dist中的index.html文件将会是一片空白

dist中的文件需要放在服务器上运行,具体的操作参考上面的博客,感谢这位博主啦!!!

config/index.js中的assetsPublicPath: '/',并不需要像网上说的改成assetsPublicPath: './'

express中的3000端口(bin/www文件中设置)

猜你喜欢

转载自blog.csdn.net/chenjineng/article/details/81369721