@birhaus/financial
Version:
Financial components and utilities for BIRHAUS design system - SEPRELAD compliant
90 lines (64 loc) • 3.71 kB
Markdown
# @birhaus/financial
## 1.0.7
### Patch Changes
- **🚨 CRITICAL SSR FIX: Properly externalize React JSX runtime**
Fixes the production SSR error: `TypeError: (0, dt.createContext) is not a function`
**What was wrong:**
- Some packages were not properly externalizing `react/jsx-runtime`
- This caused React to be bundled instead of treated as a peer dependency
- During Next.js server-side rendering, bundled React got mapped to different variables
- This broke `createContext` and other React APIs in production builds
**What's fixed:**
- Added `'react/jsx-runtime'` to `external` array in all tsup configurations
- All React-related imports are now properly externalized as peer dependencies
- Packages no longer bundle React internally, preventing SSR conflicts
**Impact:**
- Resolves SSR crashes in Next.js production builds
- Reduces bundle sizes by properly externalizing React dependencies
- Ensures consistent React version across consuming applications
This is a critical fix for all applications using BIRHAUS components in Next.js production environments.
- Updated dependencies
- @birhaus/loading@1.0.3
- @birhaus/provider@2.2.4
## 1.0.6
### Patch Changes
- Updated dependencies
- @birhaus/primitives@2.3.1
- @birhaus/loading@1.0.2
## 1.0.5
### Patch Changes
- **🔧 CRITICAL FIX: React Externalization & Production Build Error**
Resolves the critical production build error: `TypeError: (0 , ds.createContext) is not a function` affecting all applications consuming BIRHAUS components.
**Root Cause**
React was being bundled into library builds instead of being externalized as a peer dependency, causing webpack module conflicts in production builds.
**Technical Changes**
- **React Import Pattern**: Converted all destructured React imports to namespace imports
- `import { useState, useEffect } from 'react'` → `import * as React from 'react'`
- `useState` → `React.useState`, `useEffect` → `React.useEffect`
- **TSup Configuration**: Added comprehensive React externalization in `tsup.base.config.ts`
- **Module Resolution**: Ensured proper package.json exports for all packages
- **Build Verification**: Created automated script to verify React externalization
**Packages Updated**
- `@birhaus/core`: Critical UndoContext and component fixes
- `@birhaus/primitives`: BirhausToast and component library fixes
- `@birhaus/provider`: BirhausProvider context creation fixes
- All other packages: Consistent externalization patterns
**Verification**
- ✅ All 16 packages verified with proper React externalization
- ✅ Critical packages (@birhaus/core, @birhaus/primitives, @birhaus/provider) confirmed working
- ✅ Automated verification script included for future builds
**Impact**
This resolves the multi-day production build blocker affecting all BIRHAUS library consumers. Applications can now successfully build and deploy with BIRHAUS components without React module conflicts.
- Updated dependencies [29a9803]
- Updated dependencies
- Updated dependencies [1861eaf]
- @birhaus/primitives@2.3.0
- @birhaus/provider@2.2.3
- @birhaus/loading@1.0.1
- @birhaus/tokens@2.0.1
## 1.0.1
### Patch Changes
- Fix critical TypeScript and dependency issues across packages
- @birhaus/financial: Fixed zero-width character issues in BirhausTransactionList causing TypeScript compilation errors
- @birhaus/charts: Updated package configuration to use peer dependencies, fixed recharts integration and type definitions
- @birhaus/compliance: Removed workspace references, updated to peer dependencies, and fixed missing AlertTriangle import in BirhausPrivacyManager