question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

propose slight change in the documentation

See original GitHub issue

I use this in a vite project. it works great locally, but once build the code responds with “autoTable is not a function” I solved this eventually by using the alternative import and code syntax:

import jsPDF from "jspdf";
import autoTable from 'jspdf-autotable';
autoTable(doc, {...});

I suspect Vite optimizes this import out of the build

import 'jspdf-autotable';

because it doesn’t recognize it is being used. I would propose to set the import...from as the default syntax in the documentation. I feel it is the more usual way.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mickspcommented, Jan 25, 2022

@fran1987 Yeah, I saw that too. Didn’t try it but it’ll likely solve the problem as well. The solution I used is also in the docs. My suggestion is that one of these methods is better mentioned as the default way to install and use, rather then the import 'jspdf-autotable'; which is now the first thing people see and it may give them trouble when building for production.

0reactions
simonbengtssoncommented, Jun 19, 2022

Merged

Read more comments on GitHub >

github_iconTop Results From Across the Web

Effective Change Management - Documenting Changes
The key steps of change management process are: planing, evaluation, documentation, review, approval, communication, implementation, and post ...
Read more >
4 Steps to Effective Change Control | Dice.com Career Advice
Once the Change Request is documented, it's submitted to the project team. Here again, the process varies from the simple (a phone call...
Read more >
Change Request: How to Submit, Manage and Execute
A change request acts as a formal document of a proposed change to a project and are a core component of the change...
Read more >
What is a change control process and how do you use it?
A change control process is a way for project managers to submit requests to stakeholders for review, that are then approved or denied....
Read more >
Incorporate revisions with track changes - Microsoft Support
Let's say you're the original writer of a document, and you're reviewing changes suggested by others. As you go through the document, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found