Files
einfach-produktiv-invoicing/package.json
T
Marco 68d7054557 Split e-invoice exports into a separate server-only subpath
@e-invoice-eu/core pulls in Node-only dependencies (tmp/tmp-promise, for
a LibreOffice conversion path this package never actually takes) that
broke Next.js's client bundle the moment renderInvoiceEInvoice() was
re-exported from the main "." entry — that entry is reachable from a
Client Component (email-templates.ts's Live Preview import chain), so
the bundler tried pulling e-invoice-eu/core in client-side too.

New "@einfach-produktiv/invoicing/einvoice" subpath (package.json
"exports" map + src/einvoice/index.ts) holds only the e-invoice
generation functions — server-only code (API routes, Server Components,
Payload job handlers) imports from there instead. The main "." entry
keeps everything already browser-safe (computeTaxBreakdown, formatters,
InvoiceDocument for Live Preview's <PDFViewer>, the plain PDF renderers).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:31:15 +00:00

41 lines
1.1 KiB
JSON

{
"name": "@einfach-produktiv/invoicing",
"version": "0.1.0",
"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",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./einvoice": {
"types": "./src/einvoice/index.ts",
"default": "./src/einvoice/index.ts"
}
},
"scripts": {
"typecheck": "tsc --noEmit",
"test": "vitest run",
"lint": "eslint ."
},
"peerDependencies": {
"@react-pdf/renderer": "^4.0.0",
"react": "^19.0.0"
},
"devDependencies": {
"@react-pdf/renderer": "^4.5.1",
"@types/node": "^20",
"@types/react": "^19",
"eslint": "^9",
"react": "^19.2.4",
"typescript": "^5",
"vitest": "^4.1.10"
},
"dependencies": {
"@e-invoice-eu/core": "^3.1.1"
}
}