Galooshi / import-js

A tool to simplify importing JS modules
MIT License
526 stars 70 forks source link

import * as d3 from 'd3' #531

Closed jameskerr closed 7 months ago

jameskerr commented 5 years ago

I'm using d3 in a file and previously had code like this:

import * as d3 from "d3"

d3.select("svg")....

After running importjs rewrite --overwrite <filename>, my file looks like:

d3.select("svg")

It's missing the import statement.

Is there some config I can set so that it knows to include d3 as an import * as?

mikabytes commented 7 months ago

Hi. I tried to reproduce this but couldn't. Is this still an issue for you?

I'll close this issue now as it is quite old, but if it still needs attention please re-open it. Thanks.