- Install fnm and run
fnm install/fnm useto match the Node.js version in.nvmrc(v24.5.0). - Enable Corepack (
corepack enable) and then activate pnpm viacorepack prepare(the pnpm version is specified inpackageManagerfield inpackage.json). - Clone the repository and install dependencies with
pnpm installfrom the repository root.
- Monorepo via the
pnpmworkspace. packages/core(@rslib/core): CLI entry (rslib build,--watch) and programmatic helpers (build,defineConfig,loadConfig).packages/plugin-dts(rsbuild-plugin-dts): provides thedtsconfiguration hook (e.g.,{ dts: { bundle: true } }).packages/create-rslib(create-rslib): scaffolds new projects viapnpm dlx create-rslibornpx create-rslib.- Tests live in
packages/*/tests(unit) andtests/(integration,e2e,benchmark); examples inexamples/. - Key configuration files:
biome.json,.prettierrc.json,rslint.jsonc,pnpm-workspace.yaml.
- Install:
pnpm install(all packages will be built in postinstall). - Build:
pnpm build(all) andpnpm build:examples. - Watch dev:
pnpm -C packages/core dev(or other package). - Lint/format:
pnpm lint; auto-fix:pnpm format. - Type-check:
pnpm type-check. - Tests:
pnpm testruns the entire suites.pnpm test:unitscopes to unit tests.pnpm test:integrationscopes to integration tests; add<pattern>to match specific cases.pnpm test:e2eruns end-to-end tests.
- TypeScript + ESM; spaces; single quotes.
- Biome is canonical linter/formatter; Prettier formats MD/CSS/JSON and
package.json. - Run
pnpm biome check --write --unsafeon modified source files; whenpackage.jsonchanges, also runprettier --write package.json. - Filenames:
camelCaseorPascalCase(Biome enforced).
- Unit/integration:
@rstest/core; E2E:@playwright/test. - Naming:
*.test.ts/*.test.tsx; snapshots in__snapshots__/. - Placement: unit under
packages/*/tests; integration undertests/integration; e2e undertests/e2e. - Target specific integration cases:
pnpm test:integration <pattern>(faster than the full suite).
See .agents/skills/create-pr/SKILL.md for the full branching, commit message, and PR creation workflow.
- Do not commit build artifacts (
dist/,compiled/).