Loading...
Loading...
Comprehensive guide and toolkit for diagnosing Rspack build issues. Quickly identify where crashes/errors occur, or perform detailed performance profiling to resolve bottlenecks. Use when the user encounters build failures, slow builds, or wants to optimize Rspack performance.
npx skill4agent add rstackjs/agent-skills rspack-tracing# Set environment variables for logging to a file
RSPACK_PROFILE=TRACE RSPACK_TRACE_LAYER=logger RSPACK_TRACE_OUTPUT=./trace.json pnpm build.rspack-profile-{timestamp}-{pid}/trace.jsontail# Navigate to the generated profile directory
cd .rspack-profile-*/
# View the last 20 events to see where the build failed
tail -n 20 trace.json# Navigate to the generated profile directory
cd .rspack-profile-*/
# Run the analysis script
node ${CLAUDE_PLUGIN_ROOT}/skills/tracing/scripts/analyze_trace.js trace.jsonhook:CompilationOptimizeChunksrspack.config.jsrsbuild.config.tsRSPACK_PROFILE