madge
madge copied to clipboard
support for module-alias
Hello! is it possible add support for module module-alias ?? if I use this module, the svg image shows everything on the same level
+1 for https://www.npmjs.com/package/babel-plugin-module-resolver
Look like madge can't handle webpack aliases as well. I know it has an option, like:
{
"webpackConfig": "./config/webpack.config.js"
}
However, that doesn't work when I run madge from a webpack loader (I know, running madge from a loader is a very special case)
It neither works adding this to package.json
"madge": {
"webpackConfig": "./config/webpack.config.js"
}
@gperez-10pines i had the same issues. The reason was that I am using typescript too. so you need to specify both tsconfig.json and wepack.config.js in your madge config as follows:
{
"tsConfig": "tsconfig.json",
"webpackConfig": "webpack.config.ts",
"fileExtensions": [
"js",
"jsx",
"ts",
"tsx",
"json"
]
}
Cant seem to get this working... im using the CLI directly but it doesnt want to resolve any of my aliases. Everything else works fine, but i get like 2300 warnings and looking at the output for those skipped files, they are all aliased paths. Using debug i can see its resolving my tsconfig, and I have aliases set in both tsconfig and webpack config and and passing those to madge. Not sure what the deal is. :(
This is a dope project other than that.
Is there any update on this feature? I assume this is a showstopper for lots of modern developers?
Works for me (running it on cli) with module-alias if I specify --ts-config ./tsconfig.json