Upgrading pdfjs-dist to v4

Hi,
im hitting the same problem. As soon as I upgrade the pdfjs 4.x it crashes “Class private methods are not enabled. Please add @babel/plugin-transform-private-methods to your configuration.”
It makes no difference if I install from npm oder build it mysqld from pdfjs github source code.
How can I enable those babel plugins? Using an old 3.x version of pdfjs is not good, since its very old and has vulnerabilities.
Thanks

Did you build yourself from source for legacy?

Yes, I tried legacy as well as generic.
npx gulp generic
npx gulp generic-legacy
Doesn’t make a difference