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

feat(vue-script-setup-converter): Convert page meta into definePageMeta #50

Merged
merged 2 commits into from
May 5, 2024

Conversation

inouetakuya
Copy link
Contributor

@inouetakuya inouetakuya commented May 5, 2024

Problem to be solved

When converting Nuxt page components using the Vue Script Setup Converter, information such as name, layout and middleware is lost.

I want to take over these information using the definePageMeta function.

Note

Whether or not a Nuxt page component is a Nuxt page component is determined by defineNuxtComponent or not.

Copy link

vercel bot commented May 5, 2024

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

Name Status Preview Comments Updated (UTC)
wattanx-converter ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2024 10:29am

Copy link
Owner

@wattanx wattanx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you ❤️

@@ -53,6 +55,10 @@ export const convertSrc = (input: string) => {
.map((x) => x.getText())
);

if (isDefineNuxtComponent(callexpression)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine at first, but eventually it would be better to have a drop down to select whether nuxt or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree 😸

@wattanx wattanx changed the title feat: Convert page meta into definePageMeta feat(vue-script-setup-converter): Convert page meta into definePageMeta May 5, 2024
@wattanx wattanx merged commit e65a483 into wattanx:main May 5, 2024
3 checks passed
@inouetakuya inouetakuya deleted the page-meta-converter branch May 5, 2024 15:52
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