1.引出错误
我这个静态网站项目利用了icommon提供的字体图标,直接对该项目进行打包报错。
我在css文件应用“字体图标”:
@font-face {
font-family: "icomoon";
src: url("../fonts/icomoon.eot?raxfuq");
src: url("../fonts/icomoon.eot?raxfuq#iefix") format("embedded-opentype"),
url("../fonts/icomoon.ttf?raxfuq") format("truetype"),
url("../fonts/icomoon.woff?raxfuq") format("woff"),
url("../fonts/icomoon.svg?raxfuq#icomoon") format("svg");
font-weight: normal;
font-style: normal;
font-display: block;
}
打包报错:
ERROR in ./fonts/icomoon.ttf?raxfuq 1:0
Module parse failed: Unexpected character ' ' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack