SIGN IN SIGN UP

feat: add Repack/rspack plugin for React Native Storybook (#842)

* feat: add Repack/rspack plugin for React Native Storybook

Add a StorybookPlugin class at `@storybook/react-native/repack/withStorybook`
that provides equivalent functionality to the Metro `withStorybook` wrapper
for projects using Re.Pack (rspack/webpack) instead of Metro.

The plugin reuses the existing `generate()` and `createChannelServer()` functions,
so there is no code duplication with the Metro integration.

Features:
- Auto-generates `storybook.requires.ts` before first compilation
- Starts WebSocket channel server for remote control / syncing
- `enabled: false` strips all storybook code from the bundle via NormalModuleReplacementPlugin
- `liteMode` aliases @storybook/react-native-ui to an empty module

* style: format tsup.config.ts dts entry array
D
Daniel Williams committed
73f96803b17f1ad8a88cdbc42874864e0fb4c296
Parent: 692eb02
Committed by GitHub <noreply@github.com> on 2/8/2026, 6:03:20 PM