unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
340 stars 18 forks source link

feat: support `inject` with `false` values to override injections #247

Closed IgorMinar closed 1 month ago

IgorMinar commented 1 month ago

Sometimes an environment might want to undo any kind of inject configuration provided by the previous preset, because this environment guaratees that an API is provided natively and doesn't need to be supported via injection.

An example is Cloudflare's workerd, which natively support Blob and global when the nodejs_compat flag is turned on.

IgorMinar commented 1 month ago

I'm fine with false. I'll update later today.