我正在尝试使用材料设计图标,但改为渲染正方形。我刚刚在控制台中发现 vue 没有找到图标的字体,我认为是问题所在。
错误:
GET http://localhost:8080/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff2?fa3334fe030aed8470dd560acd2df136 net::ERR_ABORTED 404 (NOT FOUND)
GET http://localhost:8080/fonts/vendor/@mdi/materialdesignicons-webfont.woff2?9d0c9ec40cc136f00be859c4e9bb9e6c net::ERR_ABORTED 404 (NOT FOUND)
GET http://localhost:8080/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff?1811d381e9d3e83343943bb574f8f2e1 net::ERR_ABORTED 404 (NOT FOUND)
GET http://localhost:8080/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.ttf?45c4a4612e18a3255f512feacd025fa9 net::ERR_ABORTED 404 (NOT FOUND)
GET http://localhost:8080/fonts/vendor/@mdi/materialdesignicons-webfont.woff?ca644a1ac382257f441ed2bc75180172 net::ERR_ABORTED 404 (NOT FOUND)
GET http://localhost:8080/fonts/vendor/@mdi/materialdesignicons-webfont.ttf?aa2aa53968801d79964332fddd975474 net::ERR_ABORTED 404 (NOT FOUND)
我也在使用字体和 css 加载器:
module:{
rules:[
{
test: /\.(woff|woff2|otf|eot|ttf|svg)(\?.*$|$)/,
loader: 'url-loader?importLoaders=1&limit=100000'
},
{
test: /\.css$/,
use: [
'vue-style-loader',
{
loader: 'css-loader',
options: {
// enable CSS Modules
modules: {
// customize generated class names
localIdentName: '[local]_[hash:base64:8]'
}
}
}
]
},
]
}
有人知道发生了什么吗?