brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
rslib-best-practicesConfigure, review, or troubleshoot Rslib library builds, output formats, declarations, dependency handling, and integrations.
Independent GitHub snapshot · Automated classification · Original documentation governs
Apply these rules when writing or reviewing Rslib library projects.
rslib.config.ts and defineConfiglib.*), and also leverage Rsbuild configurations (e.g., source.*, output.*, tools.*) as neededtools.rspack or tools.bundlerChain to access Rspack's native configurationstsconfig.json path aliasesrslib to buildrslib --watch to build in watch mode for local developmentrslib inspect to inspect final Rslib/Rsbuild/Rspack configs"type": "module" in package.jsonoutput.target set to 'web' when building component librariesexports field in package.json is correctly configured and matches the actual JavaScript output and declaration files output of different formats (ESM, CJS, etc.)lib.dts: true or detailed configurationslib.dts.tsgo experimental feature with @typescript/native-preview installeddevDependencies in bundle mode and dependencies in dependencies and peerDependencies will be automatically externalized (not bundled) by defaultpackage.json carefully to ensure no missing dependency errors occur when consumers install and use this packagelib.syntax aligned with real compatibility requirements to enable better optimizations@rstest/adapter-rslib for writing tests@rspress/plugin-preview and @rspress/plugin-api-docgen for component previews and API docsDEBUG=rsbuild when diagnosing config resolution or plugin behaviordist/.rsbuild to confirm final Rsbuild/Rspack config, not assumed config