-
Problem described in detail here evanw/esbuild#1743. In summary, esbuild transpiles the alpine/packages/alpinejs/src/evaluator.js Line 54 in 9146daa into a regular function, thereby making alpine/packages/alpinejs/src/evaluator.js Line 94 in 9146daa Firefox Developer Tools:
I know it’s not directly Alpine’s fault. But I don’t see why we cannot use vanilla promises instead of this weird (but documented by MDN) way to dynamically create an async function. Apparently |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Can you provide example of the expression you are getting the |
Beta Was this translation helpful? Give feedback.
-
Edit: Since Alpine v3 supports Sure, this error is triggered by any expression actually. To reproduce, Alpine must be transpiled by a bundler that transforms Steps to reproduce
import Alpine from "alpinejs";
Alpine.start();
<html>
<head>
<script defer src="dist.js"></script>
</head>
<body x-data="{}">
</body>
</html>
|
Beta Was this translation helpful? Give feedback.
Edit: Since Alpine v3 supports
await
in expressions, it can only be used in environments with async support. See discussion in comments.Sure, this error is triggered by any expression actually. To reproduce, Alpine must be transpiled by a bundler that transforms
async
, e.g. esbuild withes2016
target.Steps to reproduce
src.js
.dist.js
.index.html
.in…