Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap await with async #16

Closed
wants to merge 1 commit into from
Closed

Conversation

pulzarraider
Copy link

With wrapping the await can be this code used in tests in real browser. Without this it cause error: Top-level await is not available in the configured target environment...

With wrapping the await can be this code used in tests in real browser. Without this it cause error: `Top-level await is not available in the configured target environment...`
@IanVS
Copy link
Owner

IanVS commented Nov 2, 2023

What browser are you using? From the MDN docs, it seems modern browsers support top-level await already: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#browser_compatibility

@pulzarraider
Copy link
Author

pulzarraider commented Nov 2, 2023

Your're right. Seems I have some configuration issue with vite My build target option is ignored and the default module (['es2020', 'edge88', 'firefox78', 'chrome87', 'safari14']) is used instead.

Closing as it is not problem of this library,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants