PDFmake: pdfmake.createPdf is not a function
问题 After installing pdfmake using npm: npm install pdfmake --save-dev and compiling bundles with webpack I get an error when running: pdfmake = require 'pdfmake' pdfmake.createPdf(doc_definition).download('test.pdf') Saying: pdfmake.createPdf is not a function I've read this suggestion, installed the script-loader and changed the requirement to: pdfmake = require 'script!pdfmake' But that gave even more errors. Besides, I wouldn't know what that script loader would be needed. Any suggestions?