mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 07:42:11 +00:00
fix: add missing import in index.ts (#188)
* added missing import in index.ts * commit changes suggested by LuanRT Co-authored-by: LuanRT <luan.lrt4@gmail.com> * removed extra require Co-authored-by: Salvador Ligayao <futuremr.ligayao03@gmail.com> Co-authored-by: LuanRT <luan.lrt4@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c6482e07b9
commit
a90f5eb853
5
index.ts
5
index.ts
@@ -10,6 +10,11 @@ if (getRuntime() === 'node') {
|
||||
Reflect.set(globalThis, 'Response', undici.Response);
|
||||
Reflect.set(globalThis, 'FormData', undici.FormData);
|
||||
Reflect.set(globalThis, 'File', undici.File);
|
||||
try {
|
||||
// eslint-disable-next-line
|
||||
const { ReadableStream } = require('node:stream/web');
|
||||
Reflect.set(globalThis, 'ReadableStream', ReadableStream);
|
||||
} catch { /* do nothing */ }
|
||||
}
|
||||
|
||||
import Innertube from './src/Innertube';
|
||||
|
||||
Reference in New Issue
Block a user