From 6686e7806944a2e119896e377040cb8f9fdb8b31 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 15 Jun 2023 17:51:12 +0300 Subject: [PATCH] bundler mainChunk param --- frontend/bundle-config.json | 1 + js/bundler/bundler-general.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/bundle-config.json b/frontend/bundle-config.json index 93209ff3ac..923f8355bc 100644 --- a/frontend/bundle-config.json +++ b/frontend/bundle-config.json @@ -10,6 +10,7 @@ ], "basePath": "client", "transpiledPath": "client/lib/transpiled", + "mainChunk": true, "chunks": { "main": { "files": [ diff --git a/js/bundler/bundler-general.js b/js/bundler/bundler-general.js index b15783487f..aa264c8d94 100644 --- a/js/bundler/bundler-general.js +++ b/js/bundler/bundler-general.js @@ -48,6 +48,7 @@ class BundlerGeneral { * modulePaths?: Record., * lookupPatterns: string[], * order: string[], + * mainChunk?: boolean, * }} config * @param {{ * src?: string, @@ -92,7 +93,7 @@ class BundlerGeneral { notBundledMap[name] = data.notBundledModules; result[name] = data.contents; - if (i === 0) { + if (i === 0 && this.config.mainChunk) { return; }