Make stripped Node.js import more resilient

This commit is contained in:
Vanilagy
2025-09-24 11:41:48 +02:00
parent 1b1dd24959
commit 0878dd2ca9
4 changed files with 11 additions and 9 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ import {
import * as nodeAlias from './node';
import { InputDisposedError } from './input';
const node = nodeAlias; // Aliasing it prevents some bundler warnings
const node = typeof nodeAlias !== 'undefined'
? nodeAlias // Aliasing it prevents some bundler warnings
: undefined!;
export type ReadResult = {
bytes: Uint8Array;