UNPKG

@nx/react

Version:

The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook. - Generators for applica

20 lines (19 loc) 768 B
import { Tree } from '@nx/devkit'; export type SupportedBundler = 'vite' | 'rsbuild' | 'rspack'; export type SupportedSurface = 'consumer' | 'provider'; export interface NormalizedScaffoldOptions { projectName: string; federationName: string; bundler: SupportedBundler; port: number; projectRoot: string; } export interface RawScaffoldOptions { directory: string; surface: SupportedSurface; bundler?: SupportedBundler; port?: number; } export declare function getDefaultPort(bundler: SupportedBundler, surface: SupportedSurface): number; export declare function toFederationName(projectName: string): string; export declare function normalizeScaffoldOptions(tree: Tree, raw: RawScaffoldOptions): Promise<NormalizedScaffoldOptions>;