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 for "external" PageRenderer not working in production #5986

Merged
merged 2 commits into from
Jun 25, 2018

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jun 18, 2018

this also allow to not bundle "./pages.json" in entry point production bundle and to not bundle JSONStore in production

closes #5920

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 18, 2018

Deploy preview for gatsbygram ready!

Built with commit 13be14f

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

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jun 18, 2018

Deploy preview for using-drupal ready!

Built with commit 13be14f

https://deploy-preview-5986--using-drupal.netlify.com

m-allanson
m-allanson previously approved these changes Jun 18, 2018
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.

👍

@m-allanson m-allanson dismissed their stale review June 21, 2018 10:01

@pieh is going to refactor slightly

@pieh pieh force-pushed the v2-exported-page-render-prod branch from 78a302f to f75fe16 Compare June 22, 2018 11:55
@pieh pieh force-pushed the v2-exported-page-render-prod branch from c342341 to 13be14f Compare June 22, 2018 13:24
@pieh
Copy link
Contributor Author

pieh commented Jun 22, 2018

This can be reviewed now.

Here's example of this working in production - https://deploy-preview-5986--gatsbyjs.netlify.com/showcase (click on any site - dimmed showcase listing should stay in background)

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.

This is much nicer 👍

I guess all the process.env.NODE_ENV checks can be removed from JSONStore now? That can be a separate PR though.

@pieh
Copy link
Contributor Author

pieh commented Jun 25, 2018

Yeah, right now we don't use JSONStore in production code and I think it's desireable. We probably could remove those checks in component itself so code is more readable and maybe add check outside of component to exit build if we are using JSONStore in production

@pieh pieh merged commit cdfbb95 into gatsbyjs:master Jun 25, 2018
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.

[v2] PageRenderer exported from gatsby doesn't work in production
3 participants