# @rsbuild/webpack

> This package can be used to switch Rsbuild's bundler from Rspack to webpack.

Latest version **1.7.0** (published 2025-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rsbuild/webpack
pnpm add @rsbuild/webpack
yarn add @rsbuild/webpack
bun add @rsbuild/webpack
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.7.0 |
| Published | 2025-12-31 |
| First published | 2023-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 203.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3386 |
| Maintainers | chenjiahan, hardfist |

## Links

- npm: https://www.npmjs.com/package/@rsbuild/webpack
- Repository: https://github.com/web-infra-dev/rsbuild
- Homepage: https://rsbuild.rs
- Issues: https://github.com/web-infra-dev/rsbuild/issues
- npm.io page: https://npm.io/package/@rsbuild/webpack

## Dependencies (7)

- [webpack](https://npm.io/package/webpack.md) ^5.104.1
- [picocolors](https://npm.io/package/picocolors.md) ^1.1.1
- [reduce-configs](https://npm.io/package/reduce-configs.md) ^1.1.1
- [copy-webpack-plugin](https://npm.io/package/copy-webpack-plugin.md) 11.0.0
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^5.6.5
- [mini-css-extract-plugin](https://npm.io/package/mini-css-extract-plugin.md) 2.9.4
- [tsconfig-paths-webpack-plugin](https://npm.io/package/tsconfig-paths-webpack-plugin.md) 4.2.0

## Recent versions

- 1.7.0 (latest) — 2025-12-31
- 1.7.0-beta.2 (beta) — 2025-12-26
- 1.2.0-alpha.0 (alpha) — 2024-12-31
- 0.0.0-next-20240729023126 (next) — 2024-07-29
- 0.0.0-nightly-20240114070311 (nightly) — 2024-01-14
- 1.7.0-beta.1 — 2025-12-23
- 1.7.0-beta.0 — 2025-12-18
- 1.6.2 — 2025-11-24
- 1.6.1 — 2025-11-12
- 1.6.0 — 2025-10-30
- 1.6.0-beta.1 — 2025-10-22
- 1.6.0-beta.0 — 2025-10-15
- 1.4.3 — 2025-10-09
- 1.4.2 — 2025-10-08
- 1.4.1 — 2025-09-29
- … 240 more at https://npm.io/package/@rsbuild/webpack/versions

## README

# @rsbuild/webpack

This package can be used to switch Rsbuild's bundler from Rspack to webpack.

<p>
  <a href="https://npmjs.com/package/@rsbuild/webpack">
   <img src="https://img.shields.io/npm/v/@rsbuild/webpack?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/webpack"><img src="https://img.shields.io/npm/dm/@rsbuild/webpack.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

> Note that this package is mainly used for compatibility with Modern.js and Rsbuild internal testing. We do not recommend you to use this package in a Rsbuild project. The API of the current package may change over iterations.

## Usage

```ts
import { defineConfig } from '@rsbuild/core';
import { webpackProvider } from '@rsbuild/webpack';
import { pluginSwc } from '@rsbuild/plugin-webpack-swc';

export default defineConfig({
  provider: webpackProvider,
  plugins: [
    // @rsbuild/webpack has no built-in transformer and minimizer,
    // so you need to register the @rsbuild/plugin-webpack-swc.
    pluginSwc(),
  ],
});
```

> Note that some Rsbuild plugins cannot be used with the webpack provider.

## Documentation

See [Documentation](https://rsbuild.rs).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).

---
_Source: https://npm.io/package/@rsbuild/webpack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
