Files
Will Binns-SmithandGitHub 70792030a0 Remove canary-gate and add experimental warning for alternate bundler (#77806)
This:
- Removes the Rspack canary gate
- Adds a warning that Rspack support is driven by the community and is
experimental.
- Links to the discussion page for feedback

Test Plan: Installed and used in an app. Verified the link is valid.
2025-04-07 17:10:43 -07:00

1.1 KiB

next-rspack (EXPERIMENTAL)

Warning

This package is currently experimental. It's not an official Next.js plugin, and is supported by the Rspack team in partnership with Next.js. Help improve Next.js and Rspack by providing feedback at https://github.com/vercel/next.js/discussions/77800

This plugin allows you to use Rspack in place of webpack with Next.js.

Installation

npm install next-rspack

or

yarn add next-rspack

Usage

Create or update a next.config.js/next.config.ts and wrap your existing configuration:

const withRspack = require('next-rspack')

/** @type {import('next').NextConfig} */
const nextConfig = {
  /* config options here */
}

module.exports = withRspack(nextConfig)

Usage with next-compose-plugins

Alternatively, you can use next-compose-plugins to quickly integrate next-rspack with other Next.js plugins:

const withPlugins = require('next-compose-plugins')
const withRspack = require('next-rspack')

module.exports = withPlugins([
  [withRspack],
  // your other plugins here
])