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

feat(gatsby-plugin-less): allow passing less plugins #12898

Merged
merged 6 commits into from May 13, 2019
Merged

Conversation

slorber
Copy link
Contributor

@slorber slorber commented Mar 27, 2019

Currently we can't declare less loader plugins because plugins can be nested one inside each others, according to https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/bootstrap/load-plugins/load.js#L134

So forwarding the "lessPlugins" attribute to the plugins loader option is a workaround to avoid this problem.

See original issue #4645

But I think Gatsby should rather generalize find a more robust and generalized solution to this conflict between "gatsby plugins with gatsby subplugins" vs "gatsby plugin with plugin taking plugins as params"

Currently we can't declare less loader plugins because plugins can be nested one inside each others, according to https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/bootstrap/load-plugins/load.js#L134

So forwarding the "lessPlugins" attribute to the plugins loader option is a workaround to avoid this problem.

See original issue #4645

But I think Gatsby should rather generalize find a more robust and generalized solution to this conflict between "gatsby plugins with gatsby subplugins" vs "gatsby plugin with plugin taking plugins as params"
@slorber slorber changed the title Fix #4645 Fix less plugin not able to receive less loader plugins #4645 Mar 27, 2019
@pieh
Copy link
Contributor

pieh commented Apr 15, 2019

I'll fix unit tests after README changes - they only break because there is empty array by default, which is not present in snapshots

@slorber
Copy link
Contributor Author

slorber commented Apr 16, 2019 via email

@slorber
Copy link
Contributor Author

slorber commented Apr 23, 2019

@pieh I've added the documentation in readme

@pieh pieh self-assigned this Apr 23, 2019
@slorber
Copy link
Contributor Author

slorber commented May 10, 2019

@pieh don't forget me please this is a tiny change ;)

@pieh
Copy link
Contributor

pieh commented May 11, 2019 via email

@pieh pieh changed the title Fix less plugin not able to receive less loader plugins #4645 feat(gatsby-plugin-less): allow passing less plugins May 13, 2019
@pieh pieh merged commit 8933ca9 into master May 13, 2019
@pieh
Copy link
Contributor

pieh commented May 13, 2019

Thanks for PR (and reminder) @slorber!

@slorber
Copy link
Contributor Author

slorber commented May 13, 2019

thanks too ;)

@wardpeet wardpeet deleted the slorber-patch-1 branch May 14, 2019 07:42
@wardpeet
Copy link
Contributor

published in gatsby-plugin-less@2.0.13 🎉

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 this pull request may close these issues.

None yet

3 participants