I need to be able to apply some pre-processing (a string replace) to .less files that are pulled in for compile, but before the less-loader
applies its own processing.
Initially I thought I could do:
test: /\.less/, include: /SomeDir/, use: ['style-loader', 'css-loader', 'less-loader', {
loader: 'string-replace-loader', options: { /* ... */ }
}]
However, observing the input to string-replace-loader
shows it's just a list of filenames, which obviously won't work.
I'm hoping I can do something with raw-loader
and pipe the output into less-loader
after the pre-processing, but I'm not sure how to tell the latter to accept raw input instead of the files.