@@ -77,17 +77,17 @@ export interface WebpackBundlerOptions {
7777}
7878
7979/**
80- * Common options for some webpack loaders
80+ * Common options for style preprocessor webpack loaders
8181 */
82- export interface LoaderOptions {
83- sourceMap ?: boolean
84- webpackImporter ?: boolean
82+ export interface StylePreprocessorLoaderOptions {
8583 additionalData ?:
8684 | string
8785 | ( (
8886 content : string ,
8987 loaderContext : LoaderContext < Record < string , any > > ,
9088 ) => string )
89+ sourceMap ?: boolean
90+ webpackImporter ?: boolean
9191}
9292
9393/**
@@ -102,18 +102,20 @@ export type StylePreprocessorOptions<
102102 *
103103 * @see https://github.com/webpack-contrib/postcss-loader#options
104104 */
105- export interface PostcssLoaderOptions extends Pick < LoaderOptions , 'sourceMap' > {
105+ export interface PostcssLoaderOptions
106+ extends Pick < StylePreprocessorLoaderOptions , 'sourceMap' > {
106107 execute ?: boolean
107- postcssOptions ?: StylePreprocessorOptions
108108 implementation ?: ( ( ...args : any ) => any ) | string
109+ postcssOptions ?: StylePreprocessorOptions
109110}
110111
111112/**
112113 * Options for stylus-loader
113114 *
114115 * @see https://github.com/webpack-contrib/stylus-loader#options
115116 */
116- export interface StylusLoaderOptions extends LoaderOptions {
117+ export interface StylusLoaderOptions extends StylePreprocessorLoaderOptions {
118+ implementation ?: ( ( ...args : any ) => any ) | string
117119 stylusOptions ?: StylePreprocessorOptions
118120}
119121
@@ -122,17 +124,20 @@ export interface StylusLoaderOptions extends LoaderOptions {
122124 *
123125 * @see https://github.com/webpack-contrib/sass-loader#options
124126 */
125- export interface SassLoaderOptions extends LoaderOptions {
127+ export interface SassLoaderOptions extends StylePreprocessorLoaderOptions {
126128 api ?: 'legacy' | 'modern' | 'modern-compiler'
127129 implementation ?: Record < string , any > | string
128130 sassOptions ?: StylePreprocessorOptions
131+ warnRuleAsWarning ?: boolean
129132}
130133
131134/**
132135 * Options for less-loader
133136 *
134137 * @see https://github.com/webpack-contrib/less-loader#options
135138 */
136- export interface LessLoaderOptions extends LoaderOptions {
139+ export interface LessLoaderOptions extends StylePreprocessorLoaderOptions {
140+ implementation ?: Record < string , any > | string
141+ lessLogAsWarnOrErr ?: boolean
137142 lessOptions ?: StylePreprocessorOptions
138143}
0 commit comments