Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemJS - Incorrect import 'jspdf' #2829

Closed
KuznetsovVN opened this issue Jul 29, 2020 · 1 comment
Closed

SystemJS - Incorrect import 'jspdf' #2829

KuznetsovVN opened this issue Jul 29, 2020 · 1 comment

Comments

@KuznetsovVN
Copy link

KuznetsovVN commented Jul 29, 2020

In my case, I am using systemjs to load ES modules. In the test module, I import the jsPDF type from the jspdf module as shown below:

import jsPDF from 'jspdf';

However when you attempt to instantiate a 'jsPDF' object, the "jsPDF is not a constructor" exception has occured.
Here is a runnable example

How to import the 'jsPDF' module correctly?

@HackbrettXXX
Copy link
Collaborator

jsPDF@1.5.3 does not yet support ES style module imports/exports. We are currently working on a new release with modern module formats (see e.g. #2804). Your example should work with the files that are currently in the dist folder of this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants