Next.js has an optimization called Module/nomodule which basically produces 2 separate bundles, one with ESM and ES6 for browsers that support it and one without ESM and more polyfills for older browsers.
We could also implement something similar in chayns-toolkit.