Skip to content

Commit

Permalink
Add supportsTopLevelAwait to caller
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 29, 2019
1 parent 15df92f commit 8a0a25a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/injectCaller.js
Original file line number Diff line number Diff line change
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 is the experimental
// flag isn't enabled.
supportsTopLevelAwait: true,
},
opts.caller,
),
Expand Down

0 comments on commit 8a0a25a

Please sign in to comment.