vue打包后 img和iocn不显示

build/utils.js 文件下

1 if (options.extract) {
2       return ExtractTextPlugin.extract({
3         use: loaders,
4         fallback: 'vue-style-loader',
5         publicPath: '../../',//解决ele小图标出不来问题
6       })
7     } else {
8       return ['vue-style-loader'].concat(loaders)
9     }

config/index.js 文件下

1  build: {
2     index: path.resolve(__dirname, '../dist/index.html'),
3     // Paths
4     assetsRoot: path.resolve(__dirname, '../dist'),
5     assetsSubDirectory: 'static',
6     assetsPublicPath: './',//解决打包完路径不对的问题

这样就OK啦~

posted @ 2020-07-09 10:15  微凉_1993  阅读(275)  评论(0编辑  收藏  举报