How do I enable node_compat such that "os" and "perf_hooks" can be imported?
We're trying to import
@opentelemtry/api
but getting errors with transient imports of "os" and "perf_hooks". How can we enable the polyfill for those in pages? The toml config guidance from the CLI is wrong IIUC.1 Reply
So you added
node_compat = true
into your wrangler.toml
and still got those errors?
node_compat
just loads some polyfills - of which, it doesn't include perf_hooks
os
is just a basic one that mostly returns basic Browser defaults