Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to exclude circular dependencies chains including a module #20

Closed
vkammerer opened this issue Aug 16, 2017 · 5 comments
Closed

Comments

@vkammerer
Copy link

Hello,

Thank you for the great plugin!

I have a module 'moduleA' in my project which I would like to exclude from the circular dependency check. I can use the "exclude" option":

{
  exclude: /moduleA/
}

But I would also like to be able to exclude any circular dependency traversing 'moduleA'... For now, the "exclude" option only tests the resource of the module being compiled, but doesn't test on the chain of the circular dependency.

Would it be possible to add this option? something similar to "excludeIfTraverses"?

{
  excludeIfTraverses: /moduleA/
}
@aackerman
Copy link
Owner

Hi, @vkammerer. Can you explain further?

You're saying that exclude will ignore something like:

moduleA -> moduleB -> moduleA

but not

moduleB -> moduleA -> moduleC -> moduleA?

@vkammerer
Copy link
Author

vkammerer commented Aug 16, 2017

Yes, with your last line being

moduleB -> moduleA -> moduleC -> moduleB

Isn't it how you wanted the option?

@aackerman
Copy link
Owner

I've published version 4 that allows a consumer to provide an onDetected option. This will allow you to accomplish the behavior you want. I'm going to go ahead and close this.

@vkammerer
Copy link
Author

ok great thank you!

@Whiskeyi
Copy link

I also have the same problem, "onDetected" cannot satisfy me because it can only control the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants