Repository navigation
Support for top level async await when using esbuild. #4611
Answered
by
mildaniel
MattBidewell
asked this question in
Questions
|
Hi there! Currently using sam cli and esbuild combo for a project and would like to make use of top level await for some initialisation work. I've got an example project here - https://github.com/MattBidewell/sam-cli-esbuild-top-level-await Has anyone got this working when using the esbuild and sam cli together? I suspect the issue is because the target is es2020 but I get the same issue when targeting es2022/1 as well. |
Answered by
mildaniel
Jan 24, 2023
Replies: 1 comment 1 reply
|
Hey @MattBidewell, Thanks for providing an example, made it really quick to reproduce. I was able to getting it working by changing the target to |
1 reply
Answer selected by
MattBidewell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @MattBidewell,
Thanks for providing an example, made it really quick to reproduce. I was able to getting it working by changing the target to
node16and changing the format fromcjstoesm.