第一:
config文件夹下的index.js 中的文件中的 assetsPublicPath :‘./’ 改为./ 不然的话会是空白页
![](http://upload-images.jianshu.io/upload_images/5805843-7163ceaacde61be9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/533/format/webp)
a.png
第二:
build/util.js文件下在 'vue-style-loader' 之后加一行:publicPath: '../../' 不然的话会有图片显示不出来,字体不能正常使用
![](http://upload-images.jianshu.io/upload_images/5805843-fa8747620ae73daf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/417/format/webp)
b.png
第三: 如果你有本地json数据的话
把本地json数据中的路径全部给为根路径
![](http://upload-images.jianshu.io/upload_images/5805843-6eadff166d714952.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/367/format/webp)
c.png
第四:就是本地用api代理的,上线之后就不要代理了
后续......