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

fix(gatsby-plugin-sass): Add support for additionalData option #36086

Merged
merged 7 commits into from
Jul 18, 2022
Merged

fix(gatsby-plugin-sass): Add support for additionalData option #36086

merged 7 commits into from
Jul 18, 2022

Conversation

laneparton
Copy link
Contributor

@laneparton laneparton commented Jul 8, 2022

Description

Adds additionalData option to gatsby-plugin-sass

Documentation

https://webpack.js.org/loaders/sass-loader/#additionaldata

Related Issues

Fixes #36085

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 8, 2022
@laneparton
Copy link
Contributor Author

Still WIP - I'm happy to add to the README

@LekoArts LekoArts added topic: plugins-styling Relates to the styling (e.g. CSS-in-JS, SASS, PostCSS) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 12, 2022
@LekoArts
Copy link
Contributor

The unit tests are currently failing () because the snapshots need an update.

And I agree, the README could use an update. A new heading called additionalData under https://github.com/laneparton/gatsby/tree/gatsby-plugin-sass-additionalData/packages/gatsby-plugin-sass#other-options should do it 👍

@laneparton laneparton marked this pull request as ready for review July 13, 2022 12:33
@laneparton
Copy link
Contributor Author

Let me know how I can make any improvements :)

@LekoArts
Copy link
Contributor

README looks good to me, unit tests still need an update though. Do you need help with that? :)

@laneparton
Copy link
Contributor Author

README looks good to me, unit tests still need an update though. Do you need help with that? :)

I'm a little fresh on writing tests, but I gave it a shot :) Let me know if you have any feedback!

One thing I'm not 100% on, was the Joi schema. I updated it to reflect the types listed here: https://webpack.js.org/loaders/sass-loader/#additionaldata - but I wasn't sure what part Joi.uknown(true) plays in the plugin schema - I had just copied it from the implementation definition.

@LekoArts
Copy link
Contributor

The unknown relates to this: https://joi.dev/api/?v=17.6.0#objectunknownallow

But since this isn't an object that's not needed

Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@LekoArts LekoArts merged commit 9a58b36 into gatsbyjs:master Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: plugins-styling Relates to the styling (e.g. CSS-in-JS, SASS, PostCSS)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gatsby-plugin-sass: Add additionalData sass-loader option
2 participants