javascript - webpack less file packaged separately error
给我你的怀抱
给我你的怀抱 2017-06-26 10:58:03
0
1
719
{
        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?

给我你的怀抱
给我你的怀抱

reply all(1)
女神的闺蜜爱上我

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template