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): Move importing of match-paths.json outside of loader.js #14732

Merged
merged 1 commit into from
Jun 13, 2019

Conversation

Moocar
Copy link
Contributor

@Moocar Moocar commented Jun 12, 2019

Description

As raised in #14729, Gatsby-link can be used independently of Gatsby itself. And it depends on loader.js to enqueue pages for prefetching. Gatsby prescribes overriding those loader functions to be noops, but it still has to compile loader.js.

The problem is that the per-page-manifest changes introduced a match-paths.json into the loader itself. Which won't compile if a gatsby build hasn't occured. To fix, I moved it out into production-app.js and app.js, and then dynamically set it.

Related Issues

@Moocar Moocar requested a review from a team as a code owner June 12, 2019 10:54
@beaucharman
Copy link

Awesome, thank you! we are getting the same issue

@wardpeet wardpeet changed the title move importing of match-paths.json outside of loader.js fix(gatsby): Move importing of match-paths.json outside of loader.js Jun 13, 2019
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

Works like a charm! ❤️ Thanks for fixing this so quickly

@wardpeet wardpeet merged commit 672e384 into gatsbyjs:master Jun 13, 2019
@wardpeet
Copy link
Contributor

Published in [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.

Using Gatsby in Storybook broken in version 2.9.0
3 participants