Pre-processor options on webpack config
Created by: bastienrobert
Is this a bug report?
No
Feature request
I think it could be cool to be able to add preProcessorOptions parameter for the getStyleLoaders function in webpack.config.js to pass an object of options to the pre-processor loader.
Example
Add data in the sass-loader (for modules) could look like this:
{
test: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent
},
'sass-loader',
{
includePaths: ['./src'],
data: '@import "config.scss";'
}
)
},
Maybe I could write some documentation if it seems good to the community