madge
madge copied to clipboard
Normal replacement plugin issue
I have components imported like
import X from './X.APP_TARGET';
in my project, where APP_TARGET is replaced into mobile
or desktop
using webpack's normal module replacement plugin during compilation.
Madge is currently not able to add this import to the dependencies list. Is there a way to fix this?
Hey!
It feels like a post-webpack run type of situation where you'd need webpack to run to do the replacement. My only hunch without running madge on the webpack output is to supply your webpack config to madge and see if the webpack import resolution in node-filing-cabinet would infer the final import path without the webpack compilation.
@mrjoelkemp , unfortunately its not working that way, there should be some provision for replacing imports path via a call back function or anything else before forming the dependency tree without use of any webpack config