2022-05-30 14:01:36 +02:00
|
|
|
import Primitives from 'next/dist/compiled/@edge-runtime/primitives'
|
2022-02-05 02:13:02 +01:00
|
|
|
|
2022-04-07 16:26:30 +02:00
|
|
|
// Polyfill Web Streams for the Node.js runtime.
|
2022-02-05 02:13:02 +01:00
|
|
|
if (!global.ReadableStream) {
|
2022-05-30 14:01:36 +02:00
|
|
|
global.ReadableStream = Primitives.ReadableStream
|
2022-04-07 16:26:30 +02:00
|
|
|
}
|
|
|
|
if (!global.TransformStream) {
|
2022-05-30 14:01:36 +02:00
|
|
|
global.TransformStream = Primitives.TransformStream
|
2022-02-05 02:13:02 +01:00
|
|
|
}
|