问题:
在pc端用element和移动端用vant时候都遇到这种情况,图标突然消失了,变成小方块,如下图:

解决办法:
在util.js里加上publicPath:'../../',即:

// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader',
publicPath:'../../' //这行是新加的
})
} else {
return ['vue-style-loader'].concat(loaders)
}
结果:

网友评论