smartstream/ts_web/plugins.ts

16 lines
454 B
TypeScript
Raw Permalink Normal View History

2024-06-02 14:42:42 +00:00
// @push.rocks scope
import * as smartenv from '@push.rocks/smartenv';
export {
smartenv,
}
// lets setup dependencies
const smartenvInstance = new smartenv.Smartenv();
await smartenvInstance.getSafeNodeModule<typeof import('stream/web')>('stream/web', async (moduleArg) => {
globalThis.ReadableStream = moduleArg.ReadableStream;
globalThis.WritableStream = moduleArg.WritableStream;
globalThis.TransformStream = moduleArg.TransformStream;
})