You can use typescript to import vue files of the same level. When importing vue files of subordinate directories, you will be prompted for Can't resolve.

there is no problem with imported sibling App.vue, but there is a problem with subordinate directories such as the vue file in components. I analyzed for a long time that it was estimated to be the problem of webpack module parsing, but I couldn"t find a solution.

Project Directory
clipboard.png


clipboard.png

webpack

clipboard.png

webpack
clipboard.png

Mar.06,2021

look at components this package name, when you introduce it, it is spelled as componets


I think the structure should be.. / components/copyedComponets/line.vue, usually IDE will prompt, according to the prompt to import must be OK.
pay attention to whether there is something wrong with the directory when writing code without prompting you

Menu