webpack——You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.

前言

这是再引入iconfont字体的时候出现的报错,You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)

步骤

查看webpack的报错已然很清楚的告诉我们,您可能需要一个合适的加载程序来处理此文件类型,目前没有配置加载程序来处理此文件那么我们只需要到webpack.base.config.js中的module的rules下配置下就阔以了;

module: {
 rules: [
    {
       test: /.(woff|svg|eot|ttf)??.*$/,
      loader: 'url-loader'
    }
  ]
}
学无止境,谦卑而行.
原文地址:https://www.cnblogs.com/wangyang0210/p/14762398.html