How to Polyfill node core modules using vite

It seems that vite does not do automatic polyfills anymore - vite 4.0.0 How do you guys go about this? I have tried multiple variations of what I could find over the internet and none of them seems...