Skip to content

Commit

Permalink
Cherry pick Add LimitChunkCountPlugin to handle importScripts error (#…
Browse files Browse the repository at this point in the history
…19477)

Add LimitChunkCountPlugin to handle importScripts error (#19475)

Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
  • Loading branch information
Kartik Raj and karthiknadig authored Jul 14, 2022
1 parent a15a658 commit b92339e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/webpack/webpack.extension.browser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '..', '..');
Expand Down Expand Up @@ -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',

Expand Down

0 comments on commit b92339e

Please sign in to comment.