使用 vue init webpack-simple 安裝elementUI, 配置之后報錯信息如下
You may need an appropriate loader to
handle this file type.
(Source code omitted for this binary file)
-------------
您可能需要一個適當(dāng)?shù)募虞d器來
處理此文件類型。
(此二進制文件省略了源代碼)
--------------
特意去官網(wǎng)看了一下, 原來simple安裝體積更小, 所有部分配置是沒有的,因為需要我們自己手動去配置,找到webapck.config.js,找到 module對象下的rules,添加如下配置即可解決字體等加載的問題
rules:[
{
test: /\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file-loader',
}]