Auto generated typescript imports with "paths" in tsconfig

Hi, 

in my package, I have 

"dependencies": {

"@myNpmModule-dev":"0.0.1"

}

 

in my tsconfig, I have 

"paths":{

"@myNpmModule/*":[

"node_modules/@myNpmModule-dev/bin/*"

]

}

 

and in all my .ts files, I have many

import {A} from "@myNpmModule/core/A";

import {B} from "@myNpmModule/core/B";

....

 

But when I use the auto generated import, it only became

import {A} from "@myNpmModule-dev/bin/core/A";

 

Is there any solution to change the format of the auto generated import path to cope with the paths in tsconfig? Many many thanks!

 

The reason for this solutions is that I have different versions of @myNpmModule-dev, @myNpmModule-master, @myNpmModule-branch to choose from depends on different cases, and I don't want to have to change all the imports in the code when switching.

 

 

 

0
1 comment

Auto-import doesn't currently respect path mappings for node_modules; please follow https://youtrack.jetbrains.com/issue/WEB-29057 for updates

0

Please sign in to leave a comment.