Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ yalc.lock
ngrok.yml
package-lock.json
yarn.lock
stats.rspack.json
.claude/settings.local.json
.claude/launch.json
.claude/plans
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"build": "NODE_OPTIONS='--max-old-space-size=4096' rspack --config ./rspack.config.ts",
"build-js-loader": "node scripts/build-js-loader.ts",
"build-js-po": "node build-utils/ts-extract-gettext.ts",
"build-profile": "rspack --profile --json > stats.json",
"build-profile": "RSPACK_STATS=1 NODE_ENV=production rspack --mode production --config ./rspack.config.ts --json=stats.rspack.json",
"extract-form-fields": "node scripts/extractFormFields.ts",
"gen:embed-widgets": "esbuild scripts/genEmbedWidgets.ts --bundle --platform=node --format=esm --packages=external --outfile=.artifacts/genEmbedWidgets.mjs && node .artifacts/genEmbedWidgets.mjs",
"gen:platform-info": "node scripts/genPlatformProductInfo.ts",
Expand Down
24 changes: 24 additions & 0 deletions rspack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,4 +990,28 @@ if (env.WEBPACK_CACHE_PATH) {
}

const configs = [appConfig, workerConfig];

// Configure JSON stats explicitly; the CLI defaults to errors and warnings.
// Keep module detail for bundle analysis without embedding source text.
if (env.RSPACK_STATS) {
for (const config of configs) {
config.stats = {
all: false,
Comment thread
ryan953 marked this conversation as resolved.
modules: true,
nestedModules: true,
source: false,
assets: true,
chunks: true,
chunkRelations: true,
chunkGroups: true,
entrypoints: true,
hash: true,
timings: true,
version: true,
errors: true,
warnings: true,
};
}
}

export default configs;
Loading