@@ -72,6 +72,8 @@ Finally, run `webpack` using the method you normally use (e.g., via CLI or an np
72
72
73
73
Type:
74
74
75
+ <!-- eslint-skip -->
76
+
75
77
``` ts
76
78
type lessOptions = import (' less' ).options | ((loaderContext : LoaderContext ) => import (' less' ).options })
77
79
` ` `
@@ -221,10 +223,10 @@ module.exports = {
221
223
const relativePath = path .relative (rootContext, resourcePath);
222
224
223
225
if (relativePath === " styles/foo.less" ) {
224
- return " @value: 100px;" + content;
226
+ return ` @value: 100px;${ content} ` ;
225
227
}
226
228
227
- return " @value: 200px;" + content;
229
+ return ` @value: 200px;${ content} ` ;
228
230
},
229
231
},
230
232
},
@@ -255,10 +257,10 @@ module.exports = {
255
257
const relativePath = path .relative (rootContext, resourcePath);
256
258
257
259
if (relativePath === " styles/foo.less" ) {
258
- return " @value: 100px;" + content;
260
+ return ` @value: 100px;${ content} ` ;
259
261
}
260
262
261
- return " @value: 200px;" + content;
263
+ return ` @value: 200px;${ content} ` ;
262
264
},
263
265
},
264
266
},
@@ -621,6 +623,8 @@ In order to use [Less plugins](http://lesscss.org/usage/#plugins), simply set th
621
623
622
624
** webpack.config.js**
623
625
626
+ <!-- eslint-skip -->
627
+
624
628
``` js
625
629
const CleanCSSPlugin = require (' less-plugin-clean-css' );
626
630
@@ -646,12 +650,14 @@ module.exports = {
646
650
647
651
``` js
648
652
module .exports = {
649
- install : function (less , pluginManager , functions ) {
650
- functions .add (" pi" , function () {
651
- // Loader context is available in `pluginManager.webpackLoaderContext`
652
-
653
- return Math .PI ;
654
- });
653
+ install (less , pluginManager , functions ) {
654
+ functions .add (
655
+ " pi" ,
656
+ () =>
657
+ // Loader context is available in `pluginManager.webpackLoaderContext`
658
+
659
+ Math .PI ,
660
+ );
655
661
},
656
662
};
657
663
```
0 commit comments