-
Notifications
You must be signed in to change notification settings - Fork 401
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(ssr): handle export { Cmp as default }
@W-17655297
#5176
Conversation
export function unimplementedTmpl(tagName: string, Cmp?: LightningElementConstructor): string { | ||
let html = `<${tagName}>`; | ||
if (Cmp?.renderMode !== 'light') { | ||
html += '<template shadowrootmode="open"></template>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be rendering the slotted content here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realized the component could just use fallbackTmpl
so removed unimplementedTmpl
packages/@lwc/ssr-compiler/src/compile-template/transformers/component/component.ts
Outdated
Show resolved
Hide resolved
…omponent/component.ts
packages/@lwc/ssr-compiler/src/compile-template/transformers/component/component.ts
Outdated
Show resolved
Hide resolved
…omponent/component.ts
Details
The most correct thing to do would be to treat
export { Cmp as default }
identically toexport default Cmp
. But engine-server's "what is an LWC component" logic is faulty, soexport { Cmp as default }
is kinda a component, but also kinda not. It's weird.Partially addresses #4020 for
ssr-compiler
.Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item