Confusion about renaming or case of vue components (files)

problem description

my project has the following warning on, run dev after upgrading a ui component library:

There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.

my understanding is that there is a component name conflict (repetition), and some people say that it is the case of the component name.

main questions

when I return the ui component version, the warning disappears.
then tried to upgrade 5 different versions and found that the above warning appeared whenever there was an upgrade.

several key points to be solved in the problem

  1. is it right to have components with the same name in different folders but not to reference components with the same name in any vue file?

    • problem known condition 1: if this warning does not exist in the project before upgrading the ui component, the fallback ui component version warning will disappear
    • problem known condition 2: look at the description of the warning, it does look like the vue files that exist in different folders have the same name

Mar.09,2021

found the problem. The updated ui component library imports vue with the path in uppercase .
so, as said on the Internet, it is a matter of uppercase and lowercase!


vue component naming convention
the file name of a single-file component should either always start with the word uppercase (PascalCase), or always be hyphenated (kebab-case).

Bad examples

components/
|- mycomponent.vue


components/
|- myComponent.vue
   
< hr >

A good example

components/
|- MyComponent.vue


components/
|- my-component.vue

< hr > For more information, please see the vue official website
ide/" rel=" nofollow noreferrer "> vue style Guide

.
Menu