Vue打包后出错:Tip: built files are meant to be served over an HTTP server. Opening index.html over file

使用命令npm run build打包vue项目之后提示 :
Tip: built files are meant to be served over an HTTP server.
Opening index.html over file
解决办法:config的index.js的build配置是默认assetsPublicPath为“/”根路径,把assetsPublicPath修 改为“./”同一个路径重新打包即可
Vue打包后出错:Tip: built files are meant to be served over an HTTP server. Opening index.html over file_第1张图片
如果还是现实不出来的话!
继续:
Vue打包后出错:Tip: built files are meant to be served over an HTTP server. Opening index.html over file_第2张图片
ExtractTextPlugin方法中添加publicPath:’…/…/'就可以了。
Vue打包后出错:Tip: built files are meant to be served over an HTTP server. Opening index.html over file_第3张图片

你可能感兴趣的:(Vue打包后出错:Tip:,built,files,are,meant)