Skip to content

Commit

Permalink
Merge pull request #814 from nicolo-ribaudo/tla
Browse files Browse the repository at this point in the history
Add supportsTopLevelAwait to caller
  • Loading branch information
nicolo-ribaudo committed Feb 26, 2020
2 parents 5f55638 + 1c35731 commit b568420
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/injectCaller.js
Expand Up @@ -11,6 +11,11 @@ module.exports = function injectCaller(opts) {
// Webpack >= 2 supports ESM and dynamic import.
supportsStaticESM: true,
supportsDynamicImport: true,

// Webpack 5 supports TLA behind a flag. We enable it by default
// for Babel, and then webpack will throw an error if the experimental
// flag isn't enabled.
supportsTopLevelAwait: true,
},
opts.caller,
),
Expand Down

0 comments on commit b568420

Please sign in to comment.