runmd icon indicating copy to clipboard operation
runmd copied to clipboard

multiple aliased imports aren't support

Open Mearman opened this issue 5 years ago • 1 comments

The following does not parse correctly

import { version as uuidVersion, validate as uuidValidate } from 'uuid';

The following has to be used instead

import { version as uuidVersion } from 'uuid';
import { validate as uuidValidate } from 'uuid';

The problem is here according to @ctavan https://github.com/broofa/runmd/commit/cdeb284a3dc3c3b48b6626167058a2ea68987f7a#diff-180b3d2af89416b99563fff8c37eb8ca1ef7591fc1ddd736b5dacf740ccd3760

Mearman avatar Dec 07 '20 17:12 Mearman

The problem back when I tried porting runmd to supporting ESM was that I wasn't sure how to implement the onRequire hack used in https://github.com/uuidjs/uuid/blame/master/README_js.md#L1

ctavan avatar Dec 07 '20 19:12 ctavan