Skip to content

Instantly share code, notes, and snippets.

@lizhongyue248
Created February 3, 2021 02:27
Show Gist options
  • Save lizhongyue248/b63c1596cb0e31d149367dd5133b8f00 to your computer and use it in GitHub Desktop.
Save lizhongyue248/b63c1596cb0e31d149367dd5133b8f00 to your computer and use it in GitHub Desktop.
Gatsby React 17: React is not defined Resovle
exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPlugin({
name: '@babel/plugin-transform-react-jsx',
options: {
runtime: 'automatic',
},
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment