garronej / denoify

🦕For NPM module authors that would like to support Deno but do not want to write and maintain a port.
http://denoify.land
MIT License
929 stars 21 forks source link

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

Open denizdogan opened 1 year ago

denizdogan commented 1 year ago

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.

garronej commented 1 year ago

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?

denizdogan commented 1 year ago

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