rspack-best-practices
Installation
SKILL.md
Rspack Best Practices
Apply these rules when writing or reviewing Rspack projects.
Configuration
- Use
rspack.config.tsanddefineConfig - Define explicit
entryvalues for multi-page applications - Keep one main config and branch by
process.env.NODE_ENVonly when needed - Keep rule conditions narrow and explicit (
test,include,exclude,resourceQuery) - Prefer built-in Rspack plugins/loaders over community JS alternatives when equivalent features exist
CLI
If @rspack/cli is installed:
- Use
rspack devfor local development - Use
rspack buildfor production build - Use
rspack previewonly for local production preview