I'm just going to build an application in Webpack and would like to integrate pdfmake unfortunately I encounter this problems. I have the file "pdfmake.js" are in my "web_modules" folder and put them with
Var pdfmake = require(" pdfmake ");
When I call the:
pdfMake.createPdf(docDefinition).open ();
doing, he tells me "CreatePDF" is not a function that has struck me, and I found that I call the "File Saver" and not "pdfmake" get back at these locations. Has this happened to anyone of you have an idea? Thanks for your help!
i solved my problem with the following code line: require("script!pdfmake"); You have to use the scriptloader from webpack.