You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting undefined from import PDFAssembler from 'pdfassembler' using Webpack (with a config that works with most libraries e.g. moment, pdfjs, jss, knockout/tko, file-saver, lodash).
I'm happy to put together a MWE to demonstrate, though I suspect the problem may be fairly apparent or trivial to solve.
An alternative would be to copy the pdfassembler.ts to dist/ since some folks (like myself) might be just as happy to use that directly.
...owing to the hefty size of the libraries (pdf.js notably) included, it might be worthwhile to distribute a version that links to global or provided options for these e.g. pdfAssembler.setup({ pdfjs: window.pdfjs }) or some such.
Activity
brianmhunt commentedon Nov 2, 2018
Just for ease of reference, here are some CLI options for
tsc:https://gist.github.com/jayphelps/51bafb4505558736fdba0aaf8bfe69d3
brianmhunt commentedon Nov 2, 2018
...owing to the hefty size of the libraries (pdf.js notably) included, it might be worthwhile to distribute a version that links to global or provided options for these e.g.
pdfAssembler.setup({ pdfjs: window.pdfjs })or some such.brianmhunt commentedon Nov 2, 2018
I also noted that the
dist/pdfassembler.jsincludesrequirestatements to a variety of imports e.g.I believe pdfassembler would be easier to consume if those modules were actually included, as opposed to
require'd.brianmhunt commentedon Nov 2, 2018
... relatedly, I'm sure folks would enjoy a CDN version.