Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

.babelrc's babel/preset-env conflicts with next/babel. #127

Closed
oqx opened this issue Dec 5, 2019 · 2 comments
Closed

.babelrc's babel/preset-env conflicts with next/babel. #127

oqx opened this issue Dec 5, 2019 · 2 comments
Labels
bug Something isn't working released

Comments

@oqx
Copy link

oqx commented Dec 5, 2019

Issue here: vercel/next.js#8175 (comment)

babel/preset-env with next/babel will result in instantiation issues with class components. Class components are still necessary in order to extend wrappers(app, doc) and utilize NextJS lifecycle methods.

Adding preset-env to next/babel fixed it for me (per linked comment):

"presets": [
    [
      "next/babel",
      {
        "preset-env": { "targets": { "node": "current" } }
      }
    ]
  ]
@KevinDanikowski
Copy link

@oqx I have that in one of my PRs, @amclin please merge or add comments to fix when you get a chance.

@KevinDanikowski
Copy link

this can be closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants