From 3f894f2d760bcf11c7417cbd910003a5b2828d81 Mon Sep 17 00:00:00 2001 From: Nick Mitchell Date: Wed, 12 Apr 2023 10:17:07 -0400 Subject: [PATCH] feat: enable top-level-await feature in webpack --- packages/webpack/headless-webpack.config.js | 3 +++ packages/webpack/webpack.config.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/webpack/headless-webpack.config.js b/packages/webpack/headless-webpack.config.js index bec75b2a8a..eae69098fb 100644 --- a/packages/webpack/headless-webpack.config.js +++ b/packages/webpack/headless-webpack.config.js @@ -198,6 +198,9 @@ const config = ( resolve: { extensions: ['.tsx', '.ts', '.js'] }, + experiments: { + topLevelAwait: true + }, watchOptions: { // here we ignore changes to any node_modules, except we want to // trigger a webpack rebuild when either of these diff --git a/packages/webpack/webpack.config.js b/packages/webpack/webpack.config.js index 9ada7c81fc..2d6f29330e 100644 --- a/packages/webpack/webpack.config.js +++ b/packages/webpack/webpack.config.js @@ -471,7 +471,10 @@ module.exports = { alias: { 'snippet-inliner': require.resolve('@kui-shell/plugin-client-common/dist/controller/snippets-inliner.js') } - }, */ + }, */ + experiments: { + topLevelAwait: true + }, watchOptions: { // here we ignore changes to any node_modules, except we want to // trigger a webpack rebuild when either of these