Created
March 28, 2022 02:30
-
-
Save chill-cod3r/e24656060e40426ea1aa7082df83e50e to your computer and use it in GitHub Desktop.
Hacky typescript esmodule commonjs interop dynamic import
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
export const dynamicImport = (packageName: string) => | |
new Function(`return import('${packageName}');`)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment