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

__PREFIX_PATHS_ is undefined in gatsby-link. Question. #1592

Closed
ghost opened this issue Jul 23, 2017 · 3 comments
Closed

__PREFIX_PATHS_ is undefined in gatsby-link. Question. #1592

ghost opened this issue Jul 23, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 23, 2017

This project has been life changing, thanks everyone for your hard work.

In the gatsby-link package, line 6. What would be the correct way to handle this global? I am attempting to create a story w/storybooks with a component that imports gatsby-link. PREFIX_PATHS is undefined and throwing a hard error. I also noticed _PREFIX_PATHS != PATH_PREFIX and not sure if that has anything to do with it.

if (__PREFIX_PATHS__) {
  pathPrefix = __PATH_PREFIX__
}

Thanks again. I am also open to suggestions on how I can help contribute and fix this if needed.

@KyleAMathews
Copy link
Contributor

Gatsby's webpack config sets that variable as a global. There's been talk before of creating a Gatsby plugin for Storybook so Storybook can emulate the Gatsby webpack setup.

@ghost
Copy link
Author

ghost commented Jul 23, 2017

Thanks. Ill look out for the plugin.

@ghost ghost closed this as completed Jul 23, 2017
@KyleAMathews
Copy link
Contributor

I don't know if it's actively being worked on so feel free to take it on :-)

This issue was closed.
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

No branches or pull requests

1 participant