UNPKG

@storybook/react-native-web-vite

Version:

Storybook for React Native Web and Vite: Develop, document, and test UI components in isolation

36 lines (33 loc) 1.58 kB
import { CompatibleString } from 'storybook/internal/types'; import { FrameworkOptions as FrameworkOptions$1, StorybookConfig as StorybookConfig$1 } from '@storybook/react-vite'; import { Options, BabelOptions } from 'vite-plugin-rnw'; export * from '@storybook/react'; export { __definePreview as definePreview } from '@storybook/react'; type FrameworkOptions = FrameworkOptions$1 & { /** * Many react native libraries aren't transpiled for the web, add them to this list to make sure * they get transpiled before attempting to load them on the web. We will automatically add * `react-native`, `@react-native`, `expo`, and `@expo` to this list. * * @example {modulesToTranspile: ['my-library']} */ modulesToTranspile?: string[]; pluginReactOptions?: Omit<Options, 'babel'> & { babel?: BabelOptions; }; /** * @deprecated These options will be ignored. Use `pluginReactOptions` now for everything and * override includes in order to transpile node_modules pluginBabelOptions will be removed in * the next major version. To configure babel, use `pluginReactOptions.babel`. */ pluginBabelOptions?: Record<string, unknown>; }; type FrameworkName = CompatibleString<'@storybook/react-native-web-vite'>; /** The interface for Storybook configuration in `main.ts` files. */ type StorybookConfig = Omit<StorybookConfig$1, 'framework'> & { framework: FrameworkName | { name: FrameworkName; options: FrameworkOptions; }; }; export type { FrameworkOptions, StorybookConfig };