Feature request#
Please consider adding an official integration for Webpack and Rspack, including a documented setup for Rsbuild.
Redact currently provides a Vite plugin and framework-specific adapters. The Next.js adapter supports Webpack, but there is no standalone integration for applications using Webpack or Rspack directly.
Motivation#
Manual aliases can redirect React entrypoints to Redact, but reproducing the Vite plugin's behavior requires additional work, particularly for:
- Feature presets and per-feature overrides.
- Consistent replacement of React, React DOM, JSX and related entrypoints.
- React 18 compatibility transforms, where applicable.
An official integration would make it easier to adopt Redact in existing applications without changing their build tool.
Possible approach#
Would it make sense to extract the shared bundler logic into an unplugin-based integration with Vite, Webpack and Rspack adapters?
A documented Rsbuild configuration using the Rspack adapter would also help. This is only an implementation suggestion; a dedicated integration would work too.
An initial implementation focused on client-side SPAs would already be useful, with SSR/RSC support documented separately.
There’s a working local prototype now. Package boundaries and version coverage still need to be finished before this can be offered as an installable integration.