Symfony configureBabel(). The code generator has deoptimised the styling of *filePath* as it exceeds the max of 500KB

Created a project via Symfony and Webpack.
I’m getting an error while compiling :

“[BABEL] Note: The code generator has deoptimised the styling of
[filePath] as it exceeds the max of 500KB.”

JS file, which causes error is 8Mb of size.
I’ve found a solution at Similar question on SO.
But I don’t know how to apply it to my project as part of code in

webpack.config.js :

// enables @babel/preset-env polyfills
.configureBabel(() => {}, {
    useBuiltIns: 'usage',
    corejs: 3
})

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *