Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: vue2 components naming #1222

Merged
merged 5 commits into from
Jul 17, 2023
Merged

Conversation

samijaber
Copy link
Contributor

Description

@vercel
Copy link

vercel bot commented Jul 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mitosis-fiddle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 2:18pm

@samijaber samijaber merged commit 3b96eaf into BuilderIO:main Jul 17, 2023
5 checks passed
@samijaber samijaber deleted the fix/vue2-naming branch July 17, 2023 14:23
@nx-cloud
Copy link

nx-cloud bot commented Jul 17, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit f31e4c0. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@kingzez
Copy link
Contributor

kingzez commented Jul 27, 2023

@samijaber Hi~, I don't understand why this is changed, can you explain why?

@samijaber
Copy link
Contributor Author

We were already transforming all component names in the <template> logic to kebab-case, but we were not doing that transformation in the components export inside <script>.

This was fine because Vue does a transformation in the background, and lets you call the same component using kebab-case or camelCase syntax. But, I found a bug where this broke for single-word component names, like Block. It would get exported as components: { Block }, but the usage would be <template> <block /> </template>, which actually does not work.

So this makes everything consistent between imports and usages.

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.

2 participants