Skip to content

Commit

Permalink
feat: set declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed May 7, 2022
1 parent 571b59e commit af4debb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ app.mount('#app');
});
</script>
```

> WARNING: Depending on how the instance was initialized, use `const pdf = usePDF().default` instead `const pdf = usePDF()`
4 changes: 1 addition & 3 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export default {
],
rollup: {
emitCJS: true,
resolve: {
dedupe: ['pdfmake']
}
},
declaration: true,
externals: ['pdfmake'],
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'pdfmake/build/pdfmake'

0 comments on commit af4debb

Please # to comment.