Fix fonts.ts crashing every client bundle that reaches it (v0.2.9)
Validate e-invoices / mustang (push) Successful in 25s
Validate e-invoices / mustang (push) Successful in 25s
The v0.2.8 fileURLToPath fix (for a Turbopack asset-hash bug in the Payload backend) wrongly assumed fonts.ts never reaches a browser bundle. It does: einfach-produktiv's LiveCompanySettingsPreviewClient renders <InvoiceDocument> client-side, and several Client Components pull this module in transitively via the index.ts barrel just by importing computeTaxBreakdown. fileURLToPath isn't a real function in a browser's node:url shim, so calling it unconditionally at module scope crashed module evaluation for any client bundle that included it — including einfach-produktiv's entire /cart page. Fix: branch on typeof window === "undefined" — browser keeps the original new URL(..., import.meta.url) idiom (correctly asset-hashed by Turbopack for a consumer's own build), Node.js keeps the fileURLToPath/path.join resolution from v0.2.8. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@einfach-produktiv/invoicing",
|
||||
"version": "0.2.8",
|
||||
"version": "0.2.9",
|
||||
"private": true,
|
||||
"description": "Shared invoice / correction-invoice (Stornorechnung, Gutschrift) PDF generation and VAT-breakdown math, consumed as a git dependency by both the einfach-produktiv frontend and the payload backend — not published to npm.",
|
||||
"type": "module",
|
||||
|
||||
Reference in New Issue
Block a user