Skip to content

Commit

Permalink
ensure cjs does not clobber esm
Browse files Browse the repository at this point in the history
  • Loading branch information
pipobscure committed Mar 19, 2024
1 parent 7560d51 commit d682a2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d682a2e

Please sign in to comment.