Skip to content

Commit

Permalink
Disable chunking to prevent importScripts calls in web (#155226)
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceerhl authored and jrieken committed Jul 18, 2022
1 parent b7093a3 commit 01171d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/shared.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const fs = require('fs');
const merge = require('merge-options');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { NLSBundlePlugin } = require('vscode-nls-dev/lib/webpack-bundler');
const { DefinePlugin } = require('webpack');
const { DefinePlugin, optimize } = require('webpack');

function withNodeDefaults(/**@type WebpackConfig*/extConfig) {
/** @type WebpackConfig */
Expand Down Expand Up @@ -145,6 +145,9 @@ function withBrowserDefaults(/**@type WebpackConfig*/extConfig, /** @type Additi
}

const browserPlugins = [
new optimize.LimitChunkCountPlugin({
maxChunks: 1
}),
new CopyWebpackPlugin({
patterns: [
{ from: 'src', to: '.', globOptions: { ignore: ['**/test/**', '**/*.ts'] }, noErrorOnMissing: true }
Expand Down

0 comments on commit 01171d0

Please sign in to comment.