Open krishnaTORQUE opened 2 years ago
Please see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Hi Thank you but this doc tells to convert into ESM which I dont want at this moment. I am just dynamically importing the cashify module but it does not work. is there any other way ?
@krishnaTORQUE I am maintaining an ES2017 fork of this package at https://www.npmjs.com/package/cashify-es2017 , which means it can be used as any other package.
Error
Error [ERR_REQUIRE_ESM]: require() of ES Module
Code
import {convert} from 'cashify';
const { convert }: any = await import('cashify');
const convert: any = (await import('cashify')).convert
;None of those examples above working.
Is there anyone facing this issue ?