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-link): provide fallback for __BASE_PATH__ being missing #13839

Merged
merged 2 commits into from
May 3, 2019

Conversation

DSchau
Copy link
Contributor

@DSchau DSchau commented May 3, 2019

Description

This fixes a regression identified by the inimitable @m-allanson--specifically that __BASE_PATH__ won't be defined in older versions of gatsby, and older versions of gatsby use a ^ for dependencies, therefore they'd be using this version.

This would have been remediated with a lockfile, but nice not to break anyone needlessly.

As such--this introduces a guard using typeof to detect the existence of __BASE_PATH__. If it's not defined, it'll fallback to the "legacy" __PATH_PREFIX__.

Related Issues

Fixes #13836

@DSchau DSchau requested a review from a team as a code owner May 3, 2019 13:18
Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

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

🌮

@DSchau DSchau merged commit dc554bf into gatsbyjs:master May 3, 2019
@DSchau DSchau deleted the gatsby-link/base-path-guard branch May 3, 2019 16:14
@DSchau
Copy link
Contributor Author

DSchau commented May 3, 2019

Published as [email protected] (and [email protected])

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.

Build error with older gatsby and newer gatsby link
2 participants