diff --git a/docs/package.json b/docs/package.json index 73108be..e87c8fd 100644 --- a/docs/package.json +++ b/docs/package.json @@ -29,6 +29,7 @@ "@docusaurus/types": "3.0.1", "@types/pdfkit": "^0.13.3", "@types/pdfmake": "^0.2.8", + "@types/react": "^18.2.43", "docusaurus-plugin-react-docgen-typescript": "^1.1.0", "docusaurus-plugin-sass": "^0.2.5", "docusaurus-preset-shiki-twoslash": "^1.1.41", diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index d15900b..e0d12f1 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -43,6 +43,9 @@ devDependencies: '@types/pdfmake': specifier: ^0.2.8 version: 0.2.8 + '@types/react': + specifier: ^18.2.43 + version: 18.2.43 docusaurus-plugin-react-docgen-typescript: specifier: ^1.1.0 version: 1.1.0(react-docgen-typescript@2.2.2)(react@18.2.0) diff --git a/src/PdfPreview.tsx b/src/PdfPreview.tsx index ab091f1..e995a39 100644 --- a/src/PdfPreview.tsx +++ b/src/PdfPreview.tsx @@ -5,7 +5,7 @@ import { TFontDictionary, } from "pdfmake/interfaces"; import { PdfNode } from "./types/PdfNode.ts"; -import pdfMake from "pdfmake/build/pdfmake"; +import pdfMake from "pdfmake/build/pdfmake.js"; import { PdfRenderer } from "./PdfRenderer.tsx"; const defaultFonts: TFontDictionary = { diff --git a/vite.config.ts b/vite.config.ts index a2a1e1a..df3c952 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -17,9 +17,9 @@ export default defineConfig({ "react", "react/jsx-runtime", "pdfmake", - "pdfmake/build/pdfmake", + "pdfmake/build/pdfmake.js", "react-reconciler", - "react-reconciler/constants", + "react-reconciler/constants.js", ], }, },