Rsbuild
Skill ComeOnOliver/skillshub/skills/TerminalSkills/skills/rsbuild
π§ The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description
npx -y skills add ComeOnOliver/skillshub --skill rsbuildAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
3.1 KB, 761 tokens by cl100k_base, as published. Nobody here has run it
Rsbuild β Rust-Powered Build Tool
You are an expert in Rsbuild, the Rspack-based build tool for web applications. You help developers configure fast builds for React, Vue, Svelte, and vanilla projects with Webpack-compatible plugin ecosystem, built-in TypeScript/CSS/asset support, module federation, and 5-10x faster builds than Webpack β providing a drop-in replacement that reuses existing Webpack loaders and plugins.
Core Capabilities
Configuration
// rsbuild.config.ts
import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { pluginSass } from "@rsbuild/plugin-sass";
import { pluginTypeCheck } from "@rsbuild/plugin-type-check";
export default defineConfig({
plugins: [
pluginReact(),
pluginSass(),
pluginTypeCheck(),
],
source: {
entry: { index: "./src/index.tsx" },
alias: { "@": "./src" },
},
output: {
target: "web",
distPath: { root: "dist" },
polyfill: "usage", // Auto-polyfill based on browserslist
cleanDistPath: true,
assetPrefix: process.env.CDN_URL || "/",
},
html: {
title: "My App",
favicon: "./src/assets/favicon.ico",
template: "./public/index.html",
},
server: {
port: 3000,
proxy: {
"/api": {
target: "http://localhost:8080",
changeOrigin: true,
},
},
},
performance: {
chunkSplit: {
strategy: "split-by-experience", // Auto-split React, lodash, etc.
},
bundleAnalyze: process.env.ANALYZE === "true"
? { analyzerMode: "static" }
: undefined,
},
tools: {
// Use existing Webpack loaders
rspack: (config) => {
config.module?.rules?.push({
test: /\.graphql$/,
use: "graphql-tag/loader",
});
},
},
});
Usage
# Create new project
npm create rsbuild@latest
# Development
npx rsbuild dev # HMR dev server
# Production build
npx rsbuild build # Optimized production bundle
# Preview
npx rsbuild preview # Serve production build locally
Installation
npm install -D @rsbuild/core @rsbuild/plugin-react
Best Practices
- Webpack compatibility β Reuse existing Webpack loaders via
tools.rspack; most plugins work without changes - Plugin system β Use official plugins for React, Vue, Svelte, Sass, Less, TypeScript; composable and fast
- Auto code splitting β
split-by-experiencestrategy auto-splits vendor libraries; optimal chunking out of box - Polyfill on demand β Set
polyfill: "usage"with browserslist; only includes polyfills for target browsers - Module Federation β Built-in support for micro-frontends; share components between independently deployed apps
- Type checking β Use
pluginTypeCheck()for parallel TypeScript checking; doesn't slow down builds - Proxy for API β Configure dev server proxy; avoid CORS issues during development
- 5-10x faster β Rspack (Rust) core provides Webpack semantics at native speed; same configs, faster builds
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.