Skip to content

Commit

Permalink
fix(gatsby-plugin-image): Use ESM for gatsby-browser, as CJS was caus…
Browse files Browse the repository at this point in the history
…ing errors (#29235) (#29266)

(cherry picked from commit 552afa9)

Co-authored-by: Matt Kane <matt@gatsbyjs.com>
  • Loading branch information
GatsbyJS Bot and ascorbic committed Jan 29, 2021
1 parent 94e8132 commit d27c968
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/gatsby-plugin-image/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
const React = require("react")
import React from "react"
import { LaterHydrator } from "."

const { LaterHydrator } = require(".")

exports.wrapRootElement = ({ element }) => {
return (
<LaterHydrator>
{element}
</LaterHydrator>
)
export function wrapRootElement({ element }) {
return <LaterHydrator>{element}</LaterHydrator>
}

0 comments on commit d27c968

Please sign in to comment.