Passing a function to `sassOptions` seems to have incorrect parameters documented
loilo opened this issue · 1 comments
loilo commented
Documentation Is:
- Missing
- Needed
- Confusing
- Not Sure?
Please Explain in Detail...
The documentation for passing a function to the sassOptions
option states that this function has a content
and a loaderContext
parameter:
// ...
{
loader: "sass-loader",
options: {
sassOptions: (content, loaderContext) => {
// ...
},
},
},
// ...
However, from what I can tell by using the loader and reading source code, only the loaderContext
is ever passed (and it always has been this way).
I'd guess that this is a left-over of copying over the code block from passing a function to additionalData
(which actually does receive both arguments).
Your Proposal for Changes
If this is confirmed to be a bug in the docs (in which I'm quite confident), I'll submit a quick PR.
alexander-akait commented
Yeal, it is a typo in docs, let's fix it