From 5587e33c0af6a0e2d620051ec397f7ec82a3cadf Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Thu, 14 Jul 2022 11:31:57 -0700 Subject: [PATCH] Add LimitChunkCountPlugin to handle importScripts error --- build/webpack/webpack.extension.browser.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/webpack/webpack.extension.browser.config.js b/build/webpack/webpack.extension.browser.config.js index 4a1ad342292a..909cceaf1bea 100644 --- a/build/webpack/webpack.extension.browser.config.js +++ b/build/webpack/webpack.extension.browser.config.js @@ -6,6 +6,7 @@ 'use strict'; const path = require('path'); +const webpack = require('webpack'); const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const packageRoot = path.resolve(__dirname, '..', '..'); @@ -35,7 +36,12 @@ const nodeConfig = (_, { mode }) => ({ extensions: ['.ts', '.js'], fallback: { path: require.resolve('path-browserify') }, }, - plugins: [new NodePolyfillPlugin()], + plugins: [ + new NodePolyfillPlugin(), + new webpack.optimize.LimitChunkCountPlugin({ + maxChunks: 1, + }), + ], externals: { vscode: 'commonjs vscode',