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 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user