Hey i am facing a probleme with exporting pdf make functionality:
var pdfMake = require('pdfmake/build/pdfmake.js');
var pdfFonts = require('pdfmake/build/vfs_fonts.js');
pdfMake.vfs = pdfFonts.pdfMake.vfs;
export default pdfMake;
import the file with a custom webpack
alias as pdfMakeGenerator
:
const pdfMake = require('pdfMakeGenerator');
pdfMake.createPdf(docDefinition).download("test");
this gives me an error like:
pdfMake.createPdf is not a function