jsPDF: Uncaught SyntaxError: Unexpected token ;

When I include this library from a webpack project,

import jsPDF from 'jsPDF';

Which imports jspdf.min.js

I get this error at the following line:

var o = t.parseBackgroundSize(e, n.image, r),
      s = t.parseBackgroundPosition(e, n.image, r, o),
      a = t.parseBackgroundRepeat(r);

I don’t see the error here. Can anyone help me figure out why it’s happening?

btw, I cannot use the jspdf.debug.js either because there are a ton of errors in it.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 30 (9 by maintainers)

Commits related to this issue

Most upvoted comments

+1 Problem still occurs on latest release.

I still can’t use jsPDF with webpack… :\

@MrRio The npm release is unusable due to that issue. Will there be a npm release including https://github.com/MrRio/jsPDF/pull/774 in the near future?

@MrRio It’s still broken on current release. It does work when building from master thought

How does 1.3.x look?

from webpack import jsPDF from 'jspdf'' yields Uncaught SyntaxError: Unexpected token ;