Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
fix: polyfill to level createRequire for esm (#161)
Browse files Browse the repository at this point in the history
fix: polyfill createRequire for esm
  • Loading branch information
JonasBa authored Jun 8, 2023
1 parent 8d53308 commit 7772d14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion esbuild.esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ esbuild.build({
target: 'esnext',
bundle: true,
tsconfig: './tsconfig.esm.json',
plugins: [missingBindingsPlugin]
plugins: [missingBindingsPlugin],
banner: {
js: `
import { createRequire } from 'module';
const require = createRequire(import.meta.url);`
}
});

0 comments on commit 7772d14

Please sign in to comment.