Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 8
    Do you know if a .babelrc or babel.config.js file is absolutely necessary? I'm trying to get mine working with just a transformIgnorePatterns declaration in my package.json Commented Oct 23, 2019 at 16:46
  • 1
    Looking at the linked github issue, it seems like it won't work in the package.json either, but I haven't tried it. Commented Oct 24, 2019 at 22:02
  • 8
    This response is underrated!! I had been bumping my head for several hours until I saw this! Heck this should be in the docs! Commented Jan 9, 2020 at 14:26
  • 2
    Weird that .babelrc doesn't work while babel.config,js does. Commented Jul 1, 2020 at 4:25
  • 1
    @Yorkshireman I had OP's issue with the declaration in package.json, but moving to babel.config.js resolved it for me. Guess Jest doesn't respect package.json babel declarations. Commented Jun 7, 2024 at 18:06