Open leonpug opened 3 years ago
Hi, try to use jsPDF with laravue with:
import jsPDF from 'jspdf'; ... const pdfName = 'test'; const doc = new jsPDF(); doc.text('Hello World', 10, 10); doc.save(pdfName + '.pdf'); ...
after
npm run dev
my app.css is 0 byte! No error in compiling or in console. If I remove jsPDF import and code, everything run normally.Any ideas? Thanks
New version import with { jsPSF }
Try
import { jsPDF } from 'jspdf';
const doc = new jsPDF();
doc.save("a4.pdf");
Thanks for replay It does not work.
I don't know what are these files:
0.js
1.js
...
This is happening to me too.
"app.css" completely empty after "npm run dev"
Hi!, let this here to help someone with the same problem:
Update laravel-mix to v6 should fix this issue
Looks like it was a problem with webpack v4 and dynamics imports, which is fixed in v5+
Source: https://github.com/JeffreyWay/laravel-mix/issues/1870
Hi, try to use jsPDF with laravue with:
import jsPDF from 'jspdf'; ... const pdfName = 'test'; const doc = new jsPDF(); doc.text('Hello World', 10, 10); doc.save(pdfName + '.pdf'); ...
after
npm run dev
my app.css is 0 byte! No error in compiling or in console. If I remove jsPDF import and code, everything run normally.Any ideas? Thanks