-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] static svelte:element not replaced with tag in production mode (#…
…7938) * [fix] static svelte:element not replaced with tag in production mode * [fix] static svelte:element not replaced with tag in production mode * add optimization of static <svelte:element> and fix a bug Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
- Loading branch information
1 parent
de6821a
commit f84c00e
Showing
8 changed files
with
65 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<svelte:element this="svg" xmlns="http://www.w3.org/2000/svg"> | ||
<svelte:element this="path" xmlns="http://www.w3.org/2000/svg"></svelte:element> | ||
</svelte:element> | ||
<script> | ||
const tag = { svg: 'svg', path: 'path' }; | ||
</script> | ||
|
||
<svelte:element this={tag.svg} xmlns="http://www.w3.org/2000/svg"> | ||
<svelte:element this={tag.path} xmlns="http://www.w3.org/2000/svg" /> | ||
</svelte:element> |
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,13 @@ | ||
export default { | ||
html: ` | ||
<div> | ||
<p></p> | ||
</div> | ||
`, | ||
|
||
test({ assert, target }) { | ||
const p = target.querySelector('p'); | ||
|
||
assert.notEqual(p, undefined); | ||
} | ||
}; |
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 @@ | ||
<div> | ||
<svelte:element this="p" /> | ||
</div> |
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,13 @@ | ||
export default { | ||
html: ` | ||
<div> | ||
<p></p> | ||
</div> | ||
`, | ||
|
||
test({ assert, target }) { | ||
const p = target.querySelector('p'); | ||
|
||
assert.notEqual(p, undefined); | ||
} | ||
}; |
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 @@ | ||
<script> | ||
const p = 'p'; | ||
</script> | ||
|
||
<div> | ||
<svelte:element this={p} /> | ||
</div> |