I want in auto-import something like modules/Component/components/MyComponent
instead of ../MyComponent
.
Is it possible to do in WebStorm?
CodePudding user response:
If modules/Component/...
path is a path from the project root (folder where tsconfig.json
is located, or the root specified with baseurl
), enabling Use paths relative to tsconfig.json in Settings | Editor | Code Style | TypeScript | Imports should be enough. Otherwise, you need specifying path mappings in the tsconfig.json