1 Problem Description
Vue3’s combinatorial API cannot be correctly identified in WebStorm, as defined ecomponent etc cannot be identified:
2 Trial Scheme
I guess the reason for this problem is that the Vue3 library cannot be correctly identified. I believe WebStorm can do this, but some configurations are not correct. I tried to check node_modules in the configured Libraries, but it did not work.
3 Solutions
The final solution can be found here:
Select the node_Modules folder, right-click Mark Directory as, and finally select Not Excluded.
It then takes some time to index and wait for completion.
4 Some thoughts
Looking at the WebStorm documentation, the folders in the project fall into four categories:
Source
: Default option, all folders are treated as defaultSource
Unless set toTests
/Resource Root
/Excluded
Tests
: folder marked as testsResource Root
: resource folder, when entering some code that requires resources, such as<img src=xxxx>
, the system automatically prompts resource files in the folder pathExcluded
: ignored folder for code completion, code navigation, and so on. This option can improveWebStorm
performance
Searching for Directories in the Settings shows that node_modules defaults to Excluded:
Marked Not Excluded, it is Not red:
So the solution is not difficult, just can’t correctly identify the cause.