menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Gatsby

Fast in every way that matters. Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps.

Channels
Team

Trying to use jsx-runtime with gatsby-plugin-preact

May 18, 2021 at 10:27am

Trying to use jsx-runtime with gatsby-plugin-preact

May 18, 2021 at 10:27am
I want to use runtime: 'automatic' but with gatsby-plugin-preact. What I did:
  • created .babelrc with [ 'babel-preset-gatsby', { reactRuntime: 'automatic' }]
  • have gatsby-plugin-react in my gatsby-config.js
What's happening: After building I get this error: Failed to Server Render (SSR) Error message: Cannot read property 'pathname' of undefined
Expected behaviour: Every thing works fine :) import * as React from 'react' is no longer necessary
No messages yet