Skip to content

Commit ecc17c2

Browse files
committed
Fix esModule flagging breaking in native ESM mode
1 parent eacee11 commit ecc17c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/base.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -371,5 +371,7 @@ export abstract class BaseOBSWebSocket extends EventEmitter<MapValueToArgsArray<
371371
}
372372

373373
// https://github.com/developit/microbundle/issues/531#issuecomment-575473024
374-
// eslint-disable-next-line @typescript-eslint/naming-convention
375-
Object.defineProperty(exports, '__esModule', {value: true});
374+
// Not using ESM export due to it also being detected and breaking rollup based bundlers (vite)
375+
if (typeof exports !== 'undefined') {
376+
Object.defineProperty(exports, '__esModule', {value: true});
377+
}

0 commit comments

Comments
 (0)