simonbengtsson / jsPDF-AutoTable

jsPDF plugin for generating PDF tables with javascript
https://simonbengtsson.github.io/jsPDF-AutoTable/
MIT License
2.33k stars 624 forks source link

How can I import using ES6? #367

Closed tgmarinho closed 6 years ago

tgmarinho commented 6 years ago

I saw someone using:

const jsPDF = require('jspdf');
require('jspdf-autotable');

But I have a project in ES6, so, I want to use import/export

like as:

import jsPDF from 'jspdf';
import { autotable } from "jspdf-autotable";

But, I think, I don't need to use jspdf because when I did download of the jspdf-autotable, jspdf coming together, right?

Project -> Node/Meteor, without webpack, React, JS ES6++, etc...

tgmarinho commented 6 years ago

Simple:

 import jsPDF from 'jspdf';
 import 'jspdf-autotable';