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

Detect circular dependencies (and avoid them) #78

Open
caesarsol opened this issue Feb 17, 2021 · 0 comments
Open

Detect circular dependencies (and avoid them) #78

caesarsol opened this issue Feb 17, 2021 · 0 comments

Comments

@caesarsol
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Sometimes circular dependencies are introduced in the project. Often without knowing, maybe for simple exported strings or trivial constants.
This introduces these possible problems:

  • webpack always refreshes the page, instead of using Hot Module Replacement;
  • some imports fail with no error, and the variable being imported results null or undefined;
  • TypeScript crazies put and laptop goes BOOOM.

Describe the solution you'd like

Add circular-dependency-plugin to Webpack by default, to error out (or a BIG warning, but I prefer error) in case of a circular dependency.

Related project: madge

cc @ivanross (for problem 3 and for the discovery of madge)
cc @pitou (for problem 2)

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

No branches or pull requests

1 participant