Open ValentineSean opened 2 years ago
I am having same issue did you resolve it?
I am having same issue did you resolve it?
My error was only displaying after I hover on "html2pdf.js" in the import statement but not in the console, so I proceeded to implementation and so far its is working as expected in MS Edge but in Firefox the behavior is a bit different.
The way that I had to fix it was like this (I dont know why yet)
import html2pdf from 'html2pdf.js/dist/html2pdf.bundle';
and I had to add to my webpack.config.js
node: {
fs: 'empty'
},
Create a file with d.ts(html2pdf.js.d.ts) and add the following code declare module 'html2pdf.js'; and it works
Do you fix this question?
Create a file with d.ts(html2pdf.js.d.ts) and add the following code declare module 'html2pdf.js'; and it works
This works, but a lib with more than 4k stars without support for typescript is....
I want to use html2pdf.js to export html table to pdf in Vue 2 and got the error Could not find a declaration file for module 'html2pdf.js'. after importing like import html2pdf from "html2pdf.js". I have "html2pdf.js": "^0.10.1", in my package.json dependencies. I also tried *import as html2pdf from "html2pdf.js"** but still got the same error. How can I solve this issue.