打赏

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'],
          }
        }
      });
  }

 

posted @ 2020-06-18 16:51  孟繁贵  阅读(3087)  评论(0编辑  收藏  举报
TOP