vue-cli vue-loader配置
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
// 修改它的选项...
return {
...options,
transformAssetUrls: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: ['xlink:href', 'href'],
use: ['xlink:href', 'href'],
'mp-image': ['src'],
'cover-image': ['src'],
'mp-audio': ['src', 'poster'],
'mp-video': ['src', 'poster','poster-for-crawler'],
}
}
});
}
作者:孟繁贵 Email:meng010387@126.com 期待共同进步!