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

NodeList.forEach polyfill missing; IE 11 breaking #30473

Closed
aaronadamsCA opened this issue Mar 25, 2021 · 0 comments · Fixed by #30483
Closed

NodeList.forEach polyfill missing; IE 11 breaking #30473

aaronadamsCA opened this issue Mar 25, 2021 · 0 comments · Fixed by #30483
Assignees
Labels
topic: webpack/babel Webpack or babel type: bug An issue or pull request relating to a bug in Gatsby

Comments

@aaronadamsCA
Copy link
Contributor

I'm using Theme UI, which uses NodeList.forEach, which is unsupported in IE 11.

I believe this should be polyfilled out of the box with Gatsby v3, due to the inclusion of core-js v3; yet I'm seeing a lot of this error from IE 11 users:

Object doesn't support property or method 'forEach'

That would seem to indicate the polyfill (web.dom-collections.for-each) is either missing or broken. You can see for yourself here: https://www.nishe.shop/

The only customizations I have relating to Webpack or Babel are these:

.babelrc.json
{
  "presets": [
    [
      "babel-preset-gatsby",
      {
        "reactRuntime": "automatic",
        "reactImportSource": "theme-ui"
      }
    ]
  ]
}
gatsby-node.js
module.exports = {
  onCreateBabelConfig: ({ actions }) => {
    actions.setBabelPlugin({
      name: "@babel/plugin-transform-react-jsx",
      options: {
        runtime: "automatic",
        importSource: "theme-ui",
      },
    });
  },
};

Gatsby 3.1.1. I'm not sure where to look next. I could drop in a polyfill just for this, but I'm concerned it may point to a larger issue, since as far as I know this should be covered out of the box.

@aaronadamsCA aaronadamsCA added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 25, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 25, 2021
@LekoArts LekoArts added topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 26, 2021
@wardpeet wardpeet self-assigned this Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants