Skip to content

Conversation

@brattonross
Copy link
Contributor

@brattonross brattonross commented Aug 22, 2020

Allows component filename and usage in the template to use different casing, e.g.

HelloWorld.vue can be represented as <hello-world />
hello-world.vue can be represented as <HelloWorld />

This is achieved by converting the component names to CapitalCase when registering them in the context, and when setting the import map, so that names are always in the same casing when performing a comparison.

Fixes #3

@antfu
Copy link
Member

antfu commented Aug 23, 2020

Great & thanks! I have added a fixture(as I am not very sure by just reading the code) and did some refactoring on this. Merging now.

@antfu antfu merged commit 099d52f into unplugin:master Aug 23, 2020
@antfu
Copy link
Member

antfu commented Aug 23, 2020

Released in v0.2.8 along with the auto-reload on components creating/renaming :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support kebab-case component names

2 participants