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-plugin-gatsby-cloud): only load indicator code when enabled #31506

Merged
merged 7 commits into from May 21, 2021

Conversation

wardpeet
Copy link
Contributor

Description

Make sure gatsby-plugin-gatsby-cloud only gets bundled when the env var is set.

I had to update our package-preset to enable gatsby-browser to be ESM compiled. In the long run we should bundle our browser packages and probably server packages too.
This way we'll have proper optimized code for the browser and node

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 20, 2021
@wardpeet wardpeet added type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 20, 2021
@wardpeet wardpeet changed the title fix(gatsby-plugin-gatsby-cloud): only load indicator code whenenabled fix(gatsby-plugin-gatsby-cloud): only load indicator code when enabled May 21, 2021
vladar
vladar previously approved these changes May 21, 2021
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

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

Looks good. Left one nit, up to you.

packages/gatsby-plugin-gatsby-cloud/.babelrc Outdated Show resolved Hide resolved
packages/babel-preset-gatsby-package/index.js Show resolved Hide resolved
Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
@wardpeet wardpeet added this to To cherry-pick in Release candidate via automation May 21, 2021
@wardpeet wardpeet merged commit cb654cd into master May 21, 2021
@wardpeet wardpeet deleted the bundle-preview-loader branch May 21, 2021 13:34
LekoArts pushed a commit that referenced this pull request May 25, 2021
#31506)

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
(cherry picked from commit cb654cd)
@LekoArts LekoArts moved this from To cherry-pick to Backport PR opened in Release candidate May 25, 2021
LekoArts pushed a commit that referenced this pull request May 25, 2021
#31506) (#31575)

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
(cherry picked from commit cb654cd)

Co-authored-by: Ward Peeters <ward@coding-tech.com>
@LekoArts LekoArts moved this from Backport PR opened to Backported in Release candidate May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants