1、静态文件路径错误
找到config文件夹下的index.js文件修改以下位置

assetsPublicPath: './',

vue打包后路径404问题解决方法

2、在css中写的background-img的路径出错 需要找到build文件夹下的utils.js,修改以下位置

    publicPath:'../../'

vue打包后路径404问题解决方法

3、修改build文件夹下的webpack.prod.conf.js 修改以下位置

publicPath: './',

vue打包后路径404问题解决方法

相关文章: