vue打包font字体文件路径错误的问题处理

修改方式:在build/utils的ExtractTextPlugin.extract里加上 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)
   }

  

posted @ 2020-05-14 15:29  Peter_Yang0942  阅读(748)  评论(0编辑  收藏  举报