报的错是:
27:9: Unknown word
也就是下面这段less
.iconColor() {
color: rgb(79, 192, 141);
}
然后我在下面使用
.side-bar-wrap {
.iconColor;
}
webpack的配置如下:
{
test: /\.less$/,
include: [
path.resolve(__dirname, 'src/styles/backend')
],
loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&localIdentName=[local]-[hash:base64:5]', 'less-loader')
}, {
test: /\.less$/,
exclude: [
path.resolve(__dirname, 'src/styles/backend')
],
loader: ExtractTextPlugin.extract('style-loader', 'css-loader?sourceMap!autoprefixer-loader!' + `less`)
}