madge
madge copied to clipboard
Not reporting cycles within index files
👋 Madge( @5 and @6) is not reporting a cycle
I do run madge --circular src/**/*
.madgerc
{
"baseDir": "./src",
"fileExtensions": [
"ts",
"tsx",
"js",
"jsx"
],
}
Meanwhile, when running the project I got the follow warning. I have confirmed the files imports each other
Require cycle: src/commons/Locales/index.ts -> src/commons/Locales/LanguageDetector.ts -> src/commons/Locales/index.ts
Can you please provide a MCVE?
I am also facing this I have used index file to export when I run this command npx madge --circular --extensions ts,tsx,js,jsx .
it is not showing any error(I solved all of them) but in terminal I am still getting 27 warnings of Require cycle:
also facing this if I do imports through an index file which does re-exports. I also don't see the dependency as part of the visualization. Here is a codesandbox which has a circular dep between Foo<>Bar
https://codesandbox.io/p/devbox/elated-moon-g6tl6q?file=%2Fpackage.json%3A11%2C16
you can run yarn verify.
played some more, seems like v5.0.2 still recognizes them as it should.