Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing a function to sassOptions seems to have incorrect parameters documented #1226

Closed
1 of 4 tasks
loilo opened this issue Aug 9, 2024 · 1 comment · Fixed by #1227
Closed
1 of 4 tasks

Passing a function to sassOptions seems to have incorrect parameters documented #1226

loilo opened this issue Aug 9, 2024 · 1 comment · Fixed by #1227

Comments

@loilo
Copy link
Contributor

loilo commented Aug 9, 2024

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
Copy link
Member

Yeal, it is a typo in docs, let's fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants