circular-dependency-plugin
circular-dependency-plugin copied to clipboard
Importing flow types causes circular dependency error
First off -- amazing plugin, this has saved me from a bunch of problems. Thank you so much!
The issue I'm seeing is this:
// foo.js
import { Bar } from './bar';
// bar.js
import { type Foo } from './foo';
This will cause circular-dependency-plugin to fail. But this makes it very difficult to do things like dependency injection, when the dependency isn't declared statically, but it's passed in.
I get that some people may wish to guard against this, still -- but would it be possible to add a flag to ignore circular dependencies when it's only types which are being circularly imported?
Thanks again for your time on this!