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 plugins not running gatsby-browser.js #4329

Merged
merged 4 commits into from
Mar 2, 2018

Conversation

m-allanson
Copy link
Contributor

@m-allanson m-allanson commented Mar 2, 2018

Due to the recent changes in plugin loading, Gatsby will no longer run a gatsby-browser.js file that doesn't export any Gatsby APIs.

This was affecting a couple of plugins which I've fixed up in this PR, along with some tweaks to the Using Remark example site.

There's room for further improvement here, as silently ignoring a plugin file is not very helpful. My suggestion is that when loading a plugin, Gatsby should show a warning for any gatsby-browser.js, gatsby-node.js or gatsby-ssr.js files that exist, but don't export any valid APIs. Does that sound sensible? Is there a better approach?

Closes #4318

@ghost ghost assigned m-allanson Mar 2, 2018
@ghost ghost added the review label Mar 2, 2018
@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit 1a7ca1d

https://deploy-preview-4329--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

Yeah, that sounds pretty reasonable. Thanks for tracking this down and fixing it!

Also... Travis is weirdly not reported back that it's succeeded. Anyways, it did, I checked :-D

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.

[gatsby-plugin-catch-links] doesn't seem to work
3 participants