我想使用svg-sprite-loader包来处理SVG图标,参考了Github上的vue-element-admin/..../index.js。
我按照花裤衩老师的教程传送门进行配置webpack.
但是发现查看了Laravel-mix的默认module rules配置(路径:node_modules/laravel-mix/src/builder/webpack-rules.js),Line:11-73有:
rules.push({
// only include svg that doesn't have font in the path or file name by using negative lookahead
test: /(\.(png|jpe?g|gif)$|^((?!font).)*\.svg$)/,
loaders: [
{
loader: 'file-loader',
......
}
]
});
// Add support for loading fonts.
rules.push({
test: /(\.(woff2?|ttf|eot|otf)$|font.*\.svg$)/,
loader: 'file-loader',
.....
});
不负相思意
白衣染霜花