rspack

Tool for bundling JavaScript/TypeScript apps with Rspack: a Rust-based alternative to webpack that reports 5–10× speed improvements. Suited for use cases like "speed up webpack" or "replace webpack," and covers webpack compatibility, configuration, loaders, plugins, and migration from webpack.

Last repository push
GitHub Stars
219
Forks
38
Issues / PRs
7

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "rspack" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6ca5ec20918f5bf63840c54973afb81f66919a1a02d029b61e64cbd63013a3c8. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Tool for bundling JavaScript/TypeScript apps with Rspack: a Rust-based alternative to webpack that reports 5–10× speed improvements. Suited for use cases like "speed up webpack" or "replace webpack," and covers webpack compatibility, configuration, loaders, plugins, and migration from webpack.

0 Downloads

Introduction source: third_party · TerminalSkills · 1.0.0 Reference

SkillPi interpretation

Audience
Webpack builds taking too long (>30 seconds) Want faster builds without rewriting config (unlike Vite migration) Large enterprise projects with heavy webpack configs Need webpack compatibility (loaders, plugins, config) with better performance Migration from Create React App or webpack-based setups
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: rspack
description: >-
  Bundle JavaScript/TypeScript applications with Rspack — Rust-based webpack
  replacement that's 5-10x faster. Use when someone asks to "speed up webpack",
  "Rspack", "fast bundler", "Rust bundler for JavaScript", "replace webpack",
  "migrate from webpack", or "faster build times". Covers webpack compatibility,
  configuration, loaders, plugins, and migration from webpack.
license: Apache-2.0
compatibility: "Node.js 18+. Drop-in webpack replacement."
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: devops
  tags: ["bundling", "rspack", "webpack", "rust", "build-tools"]

Rspack

Overview

Rspack is a Rust-based JavaScript bundler fully compatible with webpack — same config format, same loaders, same plugins, 5-10x faster builds. Created by ByteDance, it's a drop-in webpack replacement: rename your config file, install Rspack, and your existing webpack project builds in a fraction of the time. No config rewrite, no loader migration, no plugin hunting.

When to Use

  • Webpack builds taking too long (>30 seconds)
  • Want faster builds without rewriting config (unlike Vite migration)
  • Large enterprise projects with heavy webpack configs
  • Need webpack compatibility (loaders, plugins, config) with better performance
  • Migration from Create React App or webpack-based setups

Instructions

New Project

npm create rspack@latest my-app
cd my-app
npm start

Migrate from Webpack

# Install Rspack
npm install -D @rspack/core @rspack/cli

# Remove webpack
npm uninstall webpack webpack-cli webpack-dev-server
// rspack.config.js — Almost identical to webpack.config.js
const { defineConfig } = require("@rspack/cli");
const { HtmlRspackPlugin } = require("@rspack/core");

module.exports = defineConfig({
  entry: "./src/index.tsx",
  output: {
    path: "./dist",
    filename: "[name].[contenthash].js",
    clean: true,
  },
  resolve: {
    extensions: [".ts", ".tsx", ".js", ".jsx"],
    alias: { "@": "./src" },
  },
  module: {
    rules: [
      {
        test: /\.(ts|tsx)$/,
        use: {
          loader: "builtin:swc-loader",  // Built-in SWC — no babel needed
          options: {
            jsc: {
              parser: { syntax: "typescript", tsx: true },
              transform: { react: { runtime: "automatic" } },
            },
          },
        },
      },
      {
        test: /\.css$/,
        type: "css",  // Built-in CSS support
      },
      {
        test: /\.module\.css$/,
        type: "css/module",  // CSS Modules built-in
      },
      {
        test: /\.(png|jpg|svg|gif)$/,
        type: "asset",  // Built-in asset handling
      },
    ],
  },
  plugins: [
    new HtmlRspackPlugin({ template: "./index.html" }),
  ],
  devServer: {
    port: 3000,
    hot: true,
  },
});

Key Differences from Webpack

// What's built-in (no extra loaders/plugins needed):
// ✅ TypeScript/JSX via SWC — builtin:swc-loader
// ✅ CSS/CSS Modules — type: "css" / "css/module"
// ✅ Asset handling — type: "asset"
// ✅ HTML generation — HtmlRspackPlugin
// ✅ Code splitting — same as webpack
// ✅ Tree shaking — built-in
// ✅ Hot Module Replacement — built-in

// What still uses webpack loaders:
// ✅ sass-loader, less-loader — work as-is
// ✅ postcss-loader — works as-is
// ✅ Most webpack loaders — compatible

With React and Tailwind

// rspack.config.js — React + Tailwind CSS project
module.exports = {
  module: {
    rules: [
      {
        test: /\.(ts|tsx)$/,
        use: {
          loader: "builtin:swc-loader",
          options: {
            jsc: {
              parser: { syntax: "typescript", tsx: true },
              transform: { react: { runtime: "automatic" } },
            },
          },
        },
      },
      {
        test: /\.css$/,
        use: ["postcss-loader"],  // PostCSS processes Tailwind
        type: "css",
      },
    ],
  },
};

Examples

Example 1: Migrate a webpack project to Rspack

User prompt: "Our webpack build takes 60 seconds. Speed it up without rewriting the config."

The agent will install Rspack, adapt the existing webpack.config.js (minimal changes), replace babel-loader with builtin:swc-loader, and benchmark the improvement.

Example 2: Set up a new React project with Rspack

User prompt: "Create a new React + TypeScript project with fast builds."

The agent will scaffold an Rspack project with SWC for TypeScript/JSX, CSS Modules, asset handling, and dev server with HMR.

Guidelines

  • Drop-in webpack replacement — same config format, most loaders work
  • builtin:swc-loader — replaces babel-loader, 20x faster transpilation
  • type: "css" — no css-loader/style-loader needed
  • type: "asset" — no file-loader/url-loader needed
  • Most webpack plugins work — check @rspack/compat for compatibility layer
  • HMR is built-in — faster than webpack's HMR
  • Tree shaking built-in — no extra config needed
  • 5-10x faster — Rust parallelism beats single-threaded JS
  • Production-ready — used by ByteDance at scale
  • @rspack/cli — provides rspack serve and rspack build commands

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • Rspack 作为 webpack 的 Rust 替代方案,显著提升构建速度,解决前端开发中的实际痛点
  • 适用于 webpack 迁移、新项目搭建等多种高频场景,实用价值高
Trigger Precision90/100

Highlights

  • 触发词覆盖全面,包括“加速 webpack”、“Rspack”、“快速打包工具”等,边界清晰
  • 能有效匹配用户关于构建优化的多样化表达
Structure and Standards95/100

Highlights

  • 文档结构完整,包含使用场景、迁移步骤、配置示例和端到端案例
  • frontmatter 信息齐全,排版规范,易于理解
Execution Reliability90/100

Highlights

  • 提供具体安装命令和配置示例,工具来源明确
  • 覆盖常见迁移场景,步骤清晰,执行风险低
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 46

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.