diff --git a/README.md b/README.md index 2d76f4a..05a2a1f 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,5 @@ app.mount('#app'); }); ``` + +> WARNING: Depending on how the instance was initialized, use `const pdf = usePDF().default` instead `const pdf = usePDF()` \ No newline at end of file diff --git a/build.config.ts b/build.config.ts index 7778700..fc47783 100644 --- a/build.config.ts +++ b/build.config.ts @@ -17,9 +17,7 @@ export default { ], rollup: { emitCJS: true, - resolve: { - dedupe: ['pdfmake'] - } }, + declaration: true, externals: ['pdfmake'], } \ No newline at end of file diff --git a/package.json b/package.json index 411a53b..81b6aca 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "description": "A pdfmake plugin for Vue 3", "main": "dist/index.cjs", "module": "dist/index.mjs", + "types": "dist/index.d.ts", "repository": { "type": "git", "url": "https://github.com/betterwrite/vue-pdfmake" diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..119638c --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1 @@ +declare module 'pdfmake/build/pdfmake' \ No newline at end of file