diff --git a/webpack.config.js b/webpack.config.js
index fa24354a5b3e..838fb51f4361 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -139,6 +139,19 @@ export default {
           },
         },
       },
+      {
+        test: /\.js$/i,
+        exclude: /node_modules/,
+        use: [
+          {
+            loader: 'esbuild-loader',
+            options: {
+              loader: 'js',
+              target: 'es2020',
+            },
+          },
+        ],
+      },
       {
         test: /\.ts$/i,
         exclude: /node_modules/,