File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,36 @@ module.exports = {
125
125
};
126
126
```
127
127
128
+ ### Extracting Sass or LESS
129
+
130
+ The configuration is the same, switch out ` sass-loader ` for ` less-loader ` when necessary.
131
+
132
+ ``` js
133
+ const ExtractTextPlugin = require (' extract-text-webpack-plugin' );
134
+
135
+ module .exports = {
136
+ module: {
137
+ use: [
138
+ {
139
+ test: / \. scss$ / ,
140
+ use: ExtractTextPlugin .extract ({
141
+ fallback: ' style-loader' ,
142
+ // resolve-url-loader may be chained before sass-loader if necessary
143
+ use: [' css-loader' , ' sass-loader' ]
144
+ })
145
+ }
146
+ ]
147
+ },
148
+ plugins: [
149
+ new ExtractTextPlugin (' style' css)
150
+ // if you want to pass in options, you can do so:
151
+ // new ExtractTextPlugin({
152
+ // filename: 'style.css'
153
+ // })
154
+ ]
155
+ }
156
+ ```
157
+
128
158
<h2 align =" center " >Maintainer</h2 >
129
159
130
160
<table >
You can’t perform that action at this time.
0 commit comments