Posted in Javascript onSeptember 28, 2018
原因:
css-loader后面带了参数modules(打包报错)
url-loader后面带了参数name(引入报错)
{ test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: "style-loader", use: "css-loader?modules!postcss-loader" }) }, { test: /\.(svg|ttf|eot|woff)\??.*$/, loader: "url-loader?limit=10000&name=fonts/[name].[ext]" }
解决方案:去掉参数
{ test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: "style-loader", use: "css-loader!postcss-loader" }) }, { test: /\.(svg|ttf|eot|woff)\??.*$/, loader: "url-loader?limit=10000" }
或者
{ test: /\.css$/, exclude: /node_modules/, use: ExtractTextPlugin.extract({ fallback: "style-loader", use: "css-loader?modules!postcss-loader" }) }, { test: /\.css$/, include: /node_modules/, use: ExtractTextPlugin.extract({ fallback: "style-loader", use: "css-loader!postcss-loader" }) }, { test: /\.(svg|ttf|eot|woff)\??.*$/, loader: "url-loader?limit=10000" }
以上这篇解决webpack+Vue引入iView找不到字体文件的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。
解决webpack+Vue引入iView找不到字体文件的问题
- Author -
遇见一个人流泪声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@