@@ -77,17 +77,17 @@ export interface WebpackBundlerOptions {
77
77
}
78
78
79
79
/**
80
- * Common options for some webpack loaders
80
+ * Common options for style preprocessor webpack loaders
81
81
*/
82
- export interface LoaderOptions {
83
- sourceMap ?: boolean
84
- webpackImporter ?: boolean
82
+ export interface StylePreprocessorLoaderOptions {
85
83
additionalData ?:
86
84
| string
87
85
| ( (
88
86
content : string ,
89
87
loaderContext : LoaderContext < Record < string , any > > ,
90
88
) => string )
89
+ sourceMap ?: boolean
90
+ webpackImporter ?: boolean
91
91
}
92
92
93
93
/**
@@ -102,18 +102,20 @@ export type StylePreprocessorOptions<
102
102
*
103
103
* @see https://github.com/webpack-contrib/postcss-loader#options
104
104
*/
105
- export interface PostcssLoaderOptions extends Pick < LoaderOptions , 'sourceMap' > {
105
+ export interface PostcssLoaderOptions
106
+ extends Pick < StylePreprocessorLoaderOptions , 'sourceMap' > {
106
107
execute ?: boolean
107
- postcssOptions ?: StylePreprocessorOptions
108
108
implementation ?: ( ( ...args : any ) => any ) | string
109
+ postcssOptions ?: StylePreprocessorOptions
109
110
}
110
111
111
112
/**
112
113
* Options for stylus-loader
113
114
*
114
115
* @see https://github.com/webpack-contrib/stylus-loader#options
115
116
*/
116
- export interface StylusLoaderOptions extends LoaderOptions {
117
+ export interface StylusLoaderOptions extends StylePreprocessorLoaderOptions {
118
+ implementation ?: ( ( ...args : any ) => any ) | string
117
119
stylusOptions ?: StylePreprocessorOptions
118
120
}
119
121
@@ -122,17 +124,20 @@ export interface StylusLoaderOptions extends LoaderOptions {
122
124
*
123
125
* @see https://github.com/webpack-contrib/sass-loader#options
124
126
*/
125
- export interface SassLoaderOptions extends LoaderOptions {
127
+ export interface SassLoaderOptions extends StylePreprocessorLoaderOptions {
126
128
api ?: 'legacy' | 'modern' | 'modern-compiler'
127
129
implementation ?: Record < string , any > | string
128
130
sassOptions ?: StylePreprocessorOptions
131
+ warnRuleAsWarning ?: boolean
129
132
}
130
133
131
134
/**
132
135
* Options for less-loader
133
136
*
134
137
* @see https://github.com/webpack-contrib/less-loader#options
135
138
*/
136
- export interface LessLoaderOptions extends LoaderOptions {
139
+ export interface LessLoaderOptions extends StylePreprocessorLoaderOptions {
140
+ implementation ?: Record < string , any > | string
141
+ lessLogAsWarnOrErr ?: boolean
137
142
lessOptions ?: StylePreprocessorOptions
138
143
}
0 commit comments