module.exports={presets: ['next/babel'],plugins: ['styled-components'],// See https://github.com/brandonchinn178/next.js/blob/master/examples/with-styled-components/.babelrc};
So I think this is pretty much the default config. I did not customize anything about babel-preset-env
I tried with a boostraped nextjs 12 and swc (without babel configuration) and the issue is the same.
Expected Behavior
Either do not report as an error, or possibly fix the babel configuration if needed ?
If we only need to fix the eslint rule, I can open a PR. If the fix is on the babel side, I will need some help there.
Run
next info
(available from version 12.0.8 and up)No response
What version of Next.js are you using?
11.1.0 or 12.0.0
What version of Node.js are you using?
14.18.0
What browser are you using?
Chrome 67
What operating system are you using?
Windows
How are you deploying your application?
other platform
Describe the Bug
The eslint rule no-unwanted-polyfillio wrongly report es2019 as duplicate.
All
esXXX
rule are marked as Should be covered by babel-preset-env instead..My babel configuration is the following:
So I think this is pretty much the default config. I did not customize anything about babel-preset-env
I tried with a boostraped nextjs 12 and swc (without babel configuration) and the issue is the same.
Expected Behavior
Either do not report as an error, or possibly fix the babel configuration if needed ?
If we only need to fix the eslint rule, I can open a PR. If the fix is on the babel side, I will need some help there.
To Reproduce
Reproductible repository : https://github.com/jdeniau/nextjs-object-fromentries
Open a chrome <= 71 (or any browser that does not support
Object.fromEntries
) and try to run a nextjs app with the following code.It will crash with an error:
The text was updated successfully, but these errors were encountered: