File tree Expand file tree Collapse file tree 1 file changed +0
-58
lines changed Expand file tree Collapse file tree 1 file changed +0
-58
lines changed Original file line number Diff line number Diff line change @@ -203,64 +203,6 @@ module.exports = {
203
203
};
204
204
```
205
205
206
- #### ` String `
207
-
208
- ``` js
209
- module .exports = {
210
- module: {
211
- rules: [
212
- {
213
- test: / \. less$ / ,
214
- use: [
215
- ' style-loader' ,
216
- ' css-loader' ,
217
- {
218
- loader: ' less-loader' ,
219
- options: {
220
- appendData: ` @env: ${ process .env .NODE_ENV } ;` ,
221
- },
222
- },
223
- ],
224
- },
225
- ],
226
- },
227
- };
228
- ```
229
-
230
- #### ` Function `
231
-
232
- ``` js
233
- module .exports = {
234
- module: {
235
- rules: [
236
- {
237
- test: / \. less$ / ,
238
- use: [
239
- ' style-loader' ,
240
- ' css-loader' ,
241
- {
242
- loader: ' less-loader' ,
243
- options: {
244
- appendData : (loaderContext ) => {
245
- // More information about available properties https://webpack.js.org/api/loaders/
246
- const { resourcePath , rootContext } = loaderContext;
247
- const relativePath = path .relative (rootContext, resourcePath);
248
-
249
- if (relativePath === ' styles/foo.less' ) {
250
- return ' @value: 100px;' ;
251
- }
252
-
253
- return ' @value: 200px;' ;
254
- },
255
- },
256
- },
257
- ],
258
- },
259
- ],
260
- },
261
- };
262
- ```
263
-
264
206
### ` sourceMap `
265
207
266
208
Type: ` Boolean `
You can’t perform that action at this time.
0 commit comments