denoify icon indicating copy to clipboard operation
denoify copied to clipboard

Cannot transform `import x, * as xs from "..."`

Open denizdogan opened this issue 2 years ago • 2 comments

It's not a big deal, but Denoify currently fails to detect/transform imports with the following structure:

import x, * as xs from "..."

This is easily fixed by doing:

import { default as x } from "..."
import * as xs from "..."

But I think it should be considered a bug anyway.

denizdogan avatar Jun 07 '23 21:06 denizdogan

Hi @denizdogan,

It's a bug indeed, or rather a syntax that I didn't know existed. Thanks for reporting.

Why do you deconstruct the default in your workaround?

import x from "..."; isn't properly transformed?

garronej avatar Jun 07 '23 22:06 garronej

@garronej Just an old habit I guess, your version works too :)

denizdogan avatar Jun 07 '23 22:06 denizdogan