I'm writing a parser and i'm getting imports like ../modules/greeting.js
, also i have an absolute path to file (from where i have done an import) - for instance C:\Desktop\Folder\src\scripts\main.js
.
How to get path to file which i have imported? (in this case it should be src/modules/greeting.js
). Thanks!