File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,26 @@ export const isPlainObject = (obj: unknown): obj is Record<string, any> => {
2222export const PLUGIN_LESS_NAME = 'rsbuild:less' ;
2323
2424export type LessLoaderOptions = {
25+ /**
26+ * Options passed to less.
27+ * @see https://lesscss.org/usage/#less-options
28+ */
2529 lessOptions ?: import ( '../compiled/less/index.js' ) . default . Options ;
30+ /**
31+ * Prepends or appends Less code to the actual entry file.
32+ * This is especially useful when some of your Less variables
33+ * depend on the environment.
34+ */
2635 additionalData ?:
2736 | string
2837 | ( (
2938 content : string ,
3039 loaderContext : Rspack . LoaderContext < LessLoaderOptions > ,
3140 ) => string | Promise < string > ) ;
41+ /**
42+ * Whether to source map generation.
43+ * @default depends on the `devtool` value of Rspack
44+ */
3245 sourceMap ?: boolean ;
3346 /**
3447 * Enables or disables the built-in Rspack resolver.
@@ -38,6 +51,11 @@ export type LessLoaderOptions = {
3851 * @default true
3952 */
4053 webpackImporter ?: boolean | 'only' ;
54+ /**
55+ * Determines which implementation of Less to use.
56+ * Can be used to override the pre-bundled version of less.
57+ * @default "@rsbuild/plugin-less/compiled/less/index.js"
58+ */
4159 implementation ?: unknown ;
4260} ;
4361
You can’t perform that action at this time.
0 commit comments