Open jer-sen opened 11 months ago
Also worked for me. Thanks for that :+1:
I was getting "import(\"/Users/user/path\",{with:{\"resolution-mode\":\"import\"}}).MyType"
This regex fixed things for me: const REGEX_FILE_NAME_OR_SPACE =/(\bimport\(".*?"(, [^)]+)?\)|".*?")\.| /g;
With my new TS config I have some imports in the output such as:
Fixing this regex make them disappear:
var REGEX_FILE_NAME_OR_SPACE = /(\bimport\(".*?"(, \{ assert: \{ "resolution-mode": "(import|require)" \} \})?\)|".*?")\.| /g;