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

mark entry point custom element when returning metadata #79

Closed
thescientist13 opened this issue Jul 18, 2022 · 0 comments · Fixed by #86
Closed

mark entry point custom element when returning metadata #79

thescientist13 opened this issue Jul 18, 2022 · 0 comments · Fixed by #86
Assignees
Labels
documentation Improvements or additions to documentation feature New feature or request v0.6.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Jul 18, 2022

Type of Change

  • New Feature Request

Summary

It would be great for returned metadata to mark the initial custom element as the entry point, which can be helpful for more app like usages of WCC.

Details

For example

const { metadata } = await renderToString(new URL('./src/pages/home.js', import.meta.url));

/*
 * {
 *   metadata: [
 *     'wcc-home': { instanceName: 'HomePage', moduleURL: [URL], entry: true },
 *     'wcc-footer': { instanceName: 'Footer', moduleURL: [URL] },
 *     'wcc-header': { instanceName: 'Header', moduleURL: [URL] },
 *     'wcc-navigation': { instanceName: 'Navigation', moduleURL: [URL] }
 *   ]
 * }
 *

However, if there is no tagName provided, like for a layout route or page, the next level of custom elements should be used instead.

@thescientist13 thescientist13 added documentation Improvements or additions to documentation feature New feature or request good first issue Good for newcomers labels Jul 18, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone Jul 18, 2022
@thescientist13 thescientist13 removed the good first issue Good for newcomers label Aug 5, 2022
@thescientist13 thescientist13 self-assigned this Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature New feature or request v0.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant