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

feat(gatsby-source-filesystem): env flag to placeholder remote assets #27663

Merged
merged 3 commits into from
Nov 9, 2020

Conversation

pvdz
Copy link
Contributor

@pvdz pvdz commented Oct 26, 2020

This is an experimental env flag to help with debugging. It replaces any remote asset that is fetched through createRemoteFileNode with a local placeholder file. The path is used as is.

This helps with debugging and profiling sites where the remote assets are not necessary but still take minutes to download. Not meant to be used with regular sites so it's only exposed as an experimental flag.

@pvdz pvdz requested a review from a team as a code owner October 26, 2020 13:28
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 26, 2020
@pvdz pvdz added topic: dev tooling and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Oct 26, 2020
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.

Can you split up processRemoteNode so you'll have a fetch remote file so it's easier to read.

I'm more fan to save a placeholder inside the source-plugin and use it when GATSBY_EXPERIMENTAL_REMOTE_FILE_PLACEHOLDER instead of setting your own.

@pvdz
Copy link
Contributor Author

pvdz commented Oct 29, 2020

I'm more fan to save a placeholder inside the source-plugin

Considered that but I didn't really want to rely on a certain file to be present for this case and I didn't want to inline a base64 image either.

I'll split it up

@gatsbot
Copy link

gatsbot bot commented Oct 29, 2020

Danger run resulted in 1 fail and 1 markdown; to find out more, see the checks page.

Generated by 🚫 dangerJS

@pvdz pvdz requested a review from wardpeet November 2, 2020 11:04
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.

LGTM :) Happy debugging ;)

@pvdz pvdz merged commit 2b4800a into master Nov 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the remotenodeplaceholder branch November 9, 2020 09:51
mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
…gatsbyjs#27663)

* feat(gatsby-source-filesystem): add experimental env flag to use placeholder for remote asset

* Split up placeholder from remote

* reduce patch
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