Disable chunking to prevent importScripts calls in web (#155226)

This commit is contained in:
Joyce Er 2022-07-14 11:55:38 -07:00 committed by GitHub
parent ef09cb02d4
commit a0c9ebe6b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 */
@ -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 }