forked from vitejs/vite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: top level await esbuild compatibility (vitejs#3944)
- Loading branch information
1 parent
5017aeb
commit 877c2cd
Showing
3 changed files
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<h2>Async Component</h2> | ||
<p>Testing TLA and for await compatibility with esbuild</p> | ||
<p class="async-component">ab == {{ test }}</p> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
let test = '' | ||
const forAwaitTest = async (array): Promise<void> => { | ||
for await (const value of array) { | ||
test += value | ||
} | ||
} | ||
await forAwaitTest([Promise.resolve('a'), Promise.resolve('b')]).catch(() => { }) | ||
</script> |
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