-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssr): avoid reserved keyword collision (#5108)
- Loading branch information
1 parent
dc9f7d3
commit 5b0b148
Showing
6 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
7 changes: 7 additions & 0 deletions
7
packages/@lwc/engine-server/src/__tests__/fixtures/reserved-keywords/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<x-cmp> | ||
<template shadowrootmode="open"> | ||
<h1> | ||
hello | ||
</h1> | ||
</template> | ||
</x-cmp> |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/reserved-keywords/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const tagName = 'x-cmp'; | ||
export { default } from 'x/cmp'; | ||
export * from 'x/cmp'; |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/reserved-keywords/modules/x/cmp/cmp.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<h1>hello</h1> | ||
</template> |
23 changes: 23 additions & 0 deletions
23
packages/@lwc/engine-server/src/__tests__/fixtures/reserved-keywords/modules/x/cmp/cmp.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
const privateFields = undefined; | ||
const publicFields = undefined; | ||
const stylesheetScopeToken = undefined; | ||
const hasScopedStylesheets = undefined; | ||
const defaultScopedStylesheets = undefined; | ||
|
||
export default class extends LightningElement { | ||
connectedCallback() { | ||
// just use the variables to avoid them being tree-shaken | ||
Object.assign( | ||
{}, | ||
{ | ||
privateFields, | ||
publicFields, | ||
stylesheetScopeToken, | ||
hasScopedStylesheets, | ||
defaultScopedStylesheets, | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters