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

chore(babel-preset-gatsby): Updated README to include babel presets #35069

Merged
merged 8 commits into from Apr 1, 2022

Conversation

oneknucklehead
Copy link
Contributor

@oneknucklehead oneknucklehead commented Mar 7, 2022

Description

If we don't pass reactRuntime and reactImportSource to babel-preset-gatsby in .babelrc.json, JSX is invalid in gatsby-browser.js. In order to validate these errors, I have added the presets according to the docs.

Related Issues

Fixes #34518

If we don't pass reactRuntime and reactImportSource to babel-preset-gatsby in .babelrc.json, JSX is invalid in gatsby-browser.js. In order to validate these errors, I have added the presets according to the docs.
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 7, 2022
@imjoshin
Copy link
Contributor

imjoshin commented Mar 7, 2022

Hey @oneknucklehead ! Thank you for the contribution. 😄

Per @LekoArts 's suggestion, could you add the change of the second bullet point here as well?

So if I understand it correctly, two things would need to happen:

@imjoshin imjoshin added type: documentation An issue or pull request for improving or updating Gatsby's documentation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 7, 2022
@imjoshin imjoshin changed the title Updated README.md to include babel presets docs(babel-preset-gatsby): Updated README.md to include babel presets Mar 7, 2022
@oneknucklehead
Copy link
Contributor Author

Sure! but can you help me out? I can't figure out which gatsby-config file to make the changes to.

@oneknucklehead
Copy link
Contributor Author

@j0sh77 can you help me out?

@LekoArts
Copy link
Contributor

As of Gatsby 4.1 it has become necessary to set jsxruntime and jsxImportSource.
Thus, added the said changes to the docs.
Update readme.md gatsby-config.md files
@oneknucklehead
Copy link
Contributor Author

Hey @j0sh77 can you please review the changes?

@LekoArts LekoArts changed the title docs(babel-preset-gatsby): Updated README.md to include babel presets chore(babel-preset-gatsby): Updated README to include babel presets Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarification/deprecation of where to set React JSX import source
3 participants