I have a project using babel alias:
resolve: { alias: { vue: 'vue/dist/vue.js', '@cmp': resolve('src/components'), '@service': resolve('src/services'), '@scss': resolve('src/assets/styles'), } }
and a component with:
import someService from '@service/some'
And the Intellisense does not work. with:
import someService from '../../../../service/some'
It does.
Any suggestions?
If IntelliSense is not working as it should on your Windows 11/10 PC, you can try restarting VS Code and this should solve the issue. Restarting the program can be really effective and time saving in some cases. If the issue persists, you can try restarting your computer altogether.
You can enable or disable particular IntelliSense features in the Options dialog box, under Text Editor > C/C++ > Advanced.
Open the Command Palette (Ctrl+Shift+P) and choose the C/C++: Reset IntelliSense Database command.
If HTML tags autocompleting issue is on JavaScript files, then you just need to change "select language mode" from "JavaScript" to "JavaScript React". Show activity on this post. Press Ctrl + Shift + P to open the command.
Try creating a jsconfig.json and configuring the paths
compiler options
{ "compilerOptions": { "baseUrl": ".", "module": "commonjs", "paths": { "@cmp/*": ["./src/components/*"] } } }
You can find more information about paths
and other compiler options here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With