webpack打包二进制文件报错
错误示例,如下图所示:
修改webpack的module部分的rules,在其中添加一下代码:
{ test: /\.woff[0-9]{0,}$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" }, { test: /\.ttf$/,loader: "url-loader?limit=10000&mimetype=application/octet-stream" }, { test: /\.eot$/,loader: "file-loader" }, { test: /\.svg$/,loader: "url-loader?limit=10000&mimetype=image/svg+xml" },
修改后重新打包一次,OK,解决了!