create-vue icon indicating copy to clipboard operation
create-vue copied to clipboard

Use alias when importing components within `src`

Open evenstensberg opened this issue 2 years ago • 1 comments

Some of the components generated through the CLI could be imported like @/components/myComponent.vue instead of using relative import paths.

evenstensberg avatar Jan 03 '23 12:01 evenstensberg

Here are all the occurrences of such import paths: image

In these cases, I think . or .. are more readable than @. IMHO, I prefer readability over consistency (see also https://github.com/vuejs/create-vue/pull/45#issuecomment-1034555772). And if I'm not mistaken, relative paths may have better tooling support than aliases.

haoqunjiang avatar Jan 05 '23 11:01 haoqunjiang