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'
    }
  ]
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM