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)
  • Loading branch information
ascorbic committed Jan 28, 2021
1 parent 1af6e10 commit 552afa9
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/gatsby-plugin-image/gatsby-browser.js
@@ -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 552afa9

Please sign in to comment.