
Rsbuild Best Practices
Best-practices guide for writing, reviewing, and troubleshooting Rsbuild config, CLI use, type checks, and bundle size.
- skills.sh installs
- 2.9K
- GitHub stars
- 100
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers config setup with
rsbuild.config.ts, CLI usage forrsbuild,build,preview, andinspect, and asset handling rules - Includes type-checking options via
@rsbuild/plugin-type-checkor explicittsc --noEmitandvue-tsc --noEmitsteps - Enforces avoiding published
.mapfiles when production source maps are enabled, and preferring first-class options overtools.rspack - Designed for developers configuring, reviewing, or debugging Rsbuild projects with
DEBUG=rsbuildand--cpu-profprofiling
Install
$ npx -y skills add rstackjs/agent-skills --skill rsbuild-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Rsbuild best practices
Apply these rules when writing or reviewing Rsbuild projects.
Configuration
- Use
rsbuild.config.tsanddefineConfig - Use
tools.rspackortools.bundlerChainonly when no first-class Rsbuild option exists - Define explicit
source.entryvalues for multi-page applications - In TypeScript projects, prefer
tsconfig.jsonpath aliases first
CLI
- Use
rsbuildfor local development - Use
rsbuild buildfor production build - Use
rsbuild previewonly for local production preview - Use
rsbuild inspectto inspect final Rsbuild/Rspack configs
Type checking
- Use
@rsbuild/plugin-type-checkfor integrated dev/build type checks - Or run
tsc --noEmit/vue-tsc --noEmitas an explicit script step
Bundle size optimization
- Prefer dynamic
import()for non-critical code paths - Prefer lightweight libraries where possible
- Keep browserslist aligned with real compatibility requirements
Asset management
- Import source-managed assets from project source directories, not from
public - Reference
publicfiles by absolute URL path
Security
Details
- Repository
- github.com/rstackjs/agent-skills
- Categories
- Frontend & UI Code, Technical Documentation
- First seen
- May 16, 2026
More from rstackjs/agent-skills
All 12Similar to Rsbuild Best Practices
More Frontend & UI Code
rspack-best-practicesrstackjs/agent-skills702 installsOpinionated checklist for configuring, reviewing, and troubleshooting Rspack builds across config, CSS, assets, and profiling.
rslib-best-practicesrstackjs/agent-skills1.1K installsRules and workflow guide for configuring, building, and troubleshooting Rslib library projects.
react-vite-best-practicesasyrafhussin/agent-skills3K installsCurated performance rules for React and Vite covering build tuning, code splitting, dev startup, and asset handling.
typescriptpproenca/dot-skills1.8K installsTypeScript performance guide covering 45 rules for tsconfig, type errors, async patterns, and modules, prioritized by impact.
vitemindrally/skills870 installsExpert Vite guidance covering build config, HMR, framework integrations, and build performance tuning.
esbuild-bundlermindrally/skills738 installsBest-practice guide for configuring esbuild bundling, minification, and TypeScript setup with CLI and API examples.