Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How to intellisense alias module path in VSCode

$
0
0

I would like VSCode to IntelliSense the module path so I can access it by click.

For example, after configurating jsconfig.json I'm able to access ./src/styled/index by importing its global path.

But I couldn't figure out how to make it work with an alias @styles

// VSCode Intellisene Worksimport { mixins, theme } from 'styles';// VSCode Intellisene Doesn't workimport { mixins, theme } from '@styles';

enter image description here

My current jsconfig.json:

{"compilerOptions": {"baseUrl": "./","jsx": "react","paths": {"@styles": ["src/styles/index"]    }  }}

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>