rslib-best-practices
Installation
SKILL.md
Rslib Best Practices
Apply these rules when writing or reviewing Rslib library projects.
Configuration
- Use
rslib.config.tsanddefineConfig - Check Rslib-specific configurations first (e.g.,
lib.*), and also leverage Rsbuild configurations (e.g.,source.*,output.*,tools.*) as needed - For deep-level or advanced configuration needs, use
tools.rspackortools.bundlerChainto access Rspack's native configurations - In TypeScript projects, prefer
tsconfig.jsonpath aliases
CLI
- Use
rslibto build - Use
rslib --watchto build in watch mode for local development - Use
rslib inspectto inspect final Rslib/Rsbuild/Rspack configs