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): test plugin name to handle symlinks, rather than path #10835

Merged
merged 1 commit into from Jan 8, 2019

Conversation

DSchau
Copy link
Contributor

@DSchau DSchau commented Jan 4, 2019

Description

This simple PR augments the behavior to test the plugin's name, rather
than the plugin's resolved path, in the case that it could be
symlinked/linked. This seems to match the behavior we're expecting, and
again will be cleaned up when #10787 lands.

Related Issues

Related to #10787, #10786

This simple PR augments the behavior to test the plugin's name, rather
than the plugin's resolved path, in the case that it could be
symlinked/linked. This seems to match the behavior we're expecting, and
_again_ will be cleaned up when gatsbyjs#10787 lands.
@DSchau DSchau requested a review from a team as a code owner January 4, 2019 16:47
@@ -66,7 +66,7 @@ const overlayErrorID = `graphql-compiler`

const resolveThemes = (plugins = []) =>
plugins.reduce((merged, plugin) => {
if (plugin.resolve.includes(`gatsby-theme-`)) {
if (plugin.name.includes(`gatsby-theme-`)) {
Copy link
Contributor Author

@DSchau DSchau Jan 4, 2019

Choose a reason for hiding this comment

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

plugin.resolve is the symlinked path when running yarn link or npm link. This change will work with symlinked modules and "regular" (e.g. modules in node_modules) alike.

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

🌮

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

2 participants