Created
July 31, 2024 03:22
-
-
Save JPBM135/90e1ae7c6caa8325f28e95027b3b7e7d to your computer and use it in GitHub Desktop.
Hack import.meta.url with esbuild esm to cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const metaUrl = Reflect.has(globalThis, 'require') ? import.meta.url : pathToFileURL(__filename); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment