I am trying to reduce nextjs project's bundle sizes. There is a core-js bundle for polyfills. I want to remove this core-js from the main bundle size. It has 50KB of size.
I tried to use custom babel configuration like this:
{
"presets": [
[
"next/babel",
{
"useBuiltIns": "usage",
"corejs": "3"
}
]
]
}
But it didn't help.
How can I remove the corejs from a NextJS project?
Any help will be appreciated.
Thanks