{
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
}
This is packaged to the head, but I want to package it into a separate file, so I changed it to
{
test: /\.less$/,
loader:ExtractTextPlugin.extract("style-loader","css-loader","less-loader")
}
The packaged style is equivalent to copying the content in the less file. My content in the less file is as follows:
@color:yellow;
html{
border:10px solid @color;
}
The packaged style is also like this
@color:yellow;
html{
border:10px solid @color;
}
Is this what is the reason?
It seems to be the writing method of webpack1.x, you can refer to https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/webpack-1/README.md