Skip to content

Commit b92339e

Browse files
Kartik Rajkarthiknadig
andauthored
Cherry pick Add LimitChunkCountPlugin to handle importScripts error (#19477)
Add LimitChunkCountPlugin to handle importScripts error (#19475) Co-authored-by: Karthik Nadig <[email protected]>
1 parent a15a658 commit b92339e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build/webpack/webpack.extension.browser.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
'use strict';
77

88
const path = require('path');
9+
const webpack = require('webpack');
910
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
1011

1112
const packageRoot = path.resolve(__dirname, '..', '..');
@@ -35,7 +36,12 @@ const nodeConfig = (_, { mode }) => ({
3536
extensions: ['.ts', '.js'],
3637
fallback: { path: require.resolve('path-browserify') },
3738
},
38-
plugins: [new NodePolyfillPlugin()],
39+
plugins: [
40+
new NodePolyfillPlugin(),
41+
new webpack.optimize.LimitChunkCountPlugin({
42+
maxChunks: 1,
43+
}),
44+
],
3945
externals: {
4046
vscode: 'commonjs vscode',
4147

0 commit comments

Comments
 (0)