From 564044f6ac6513b99785f3b0455b753a16d93435 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 17 Jul 2026 15:01:22 +0300 Subject: [PATCH] trim webpack stats file to assets only The CI bundle-size-diff action require()s stats.json as one string; the migration's fine-grained lex/sdk module graph pushed the default stats output to ~611MB, past V8's 512MB string cap. The action only reads assets[], so drop the module graph from the generated file. Co-Authored-By: Claude Fable 5 --- webpack.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index dace4e8fe5..0df4932221 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -108,6 +108,22 @@ module.exports = async function (env, argv) { statsFilename: '../stats.json', analyzerMode: OPEN_ANALYZER ? 'server' : 'json', defaultSizes: 'parsed', + /* + * The CI bundle-size-diff action only reads `assets[]`, and it loads + * the whole stats file as a single string. Without trimming, the + * module graph (`reasons` et al) makes stats.json ~611MB, which blows + * V8's 512MB string cap in that action. The interactive analyzer + * (`OPEN_ANALYZER`) doesn't read this file, so it's unaffected. + */ + statsOptions: { + assets: true, + modules: false, + reasons: false, + usedExports: false, + providedExports: false, + chunkModules: false, + source: false, + }, }), ) }