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

Add supportsTopLevelAwait to caller #814

Merged
merged 2 commits into from Feb 26, 2020
Merged

Conversation

nicolo-ribaudo
Copy link
Member

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the new behavior?

Babel 7.7.0 will have support for parsing top-level await expressions. Since webpack 5 has experimental support for top-level await, it can be enabled by default in Babel.
If the experimental.topLevelAwait flag isn't enabled in webpack, Babel will parse it and then webpack will generate an error suggesting to enable that option.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information:

I didn't add a test because

  1. Babel 7.7 isn't released yet
  2. I couldn't get TLA to work in webpack, even without using Babel.

src/injectCaller.js Outdated Show resolved Hide resolved
@nicolo-ribaudo nicolo-ribaudo self-assigned this Jan 30, 2020
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.

None yet

3 participants