From d682a2ea710f2c97d7e5aafde3966e3ec7b3ba72 Mon Sep 17 00:00:00 2001 From: Philipp Dunkel Date: Tue, 19 Mar 2024 15:54:07 +0000 Subject: [PATCH] ensure cjs does not clobber esm --- src/runtime.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime.ts b/src/runtime.ts index 719e1c8..c7c9b26 100644 --- a/src/runtime.ts +++ b/src/runtime.ts @@ -130,6 +130,8 @@ function resolve(parent?: string, specifier?: string) { } } function patch(id: string, exports: object) { + // @ts-expect-error + exports.__esModule = true; switch (id) { case 'node:fs': return patchFS(exports as typeof FS);