The Edge Runtime is built on top of Web APIs available in Node.js.
If you are using an old Node.js version, then it is likely one of these Web APIs is missing. The Edge Runtime takes care of this by providing polyfills.
Under the hood, the following Web APIs are used by the Edge Runtime:
polyfill | node12 | node14 | node16 | node18 |
---|---|---|---|---|
http | x | |||
util.types | x | |||
buffer | x | |||
WebCrypto | x | x | ||
AbortController, AbortSignal | x | x | ||
base64 | x | x | ||
fetch, Request, Response | x | x | x | |
URLPattern | x | x | x | x |
Cache | x | x | x | x |
WebStreams | x | x | x | x |
The Edge Runtime polyfills missing APIs for backward compatibility with older Node.js versions.
In the future, Node.js will become a superset of the Edge Runtime with built-in support for the available APIs.