bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.63k stars 2.04k forks source link

Fail building in a quasar-vite project #2624

Open han-ysys opened 1 year ago

han-ysys commented 1 year ago

Hello,

I've encountered an issue while developing in a Quasar-Vite-Vue3 environment. Initially, I set up the import like this:

import * as pdfMake from 'pdfmake/build/pdfmake';
import * as pdfFonts from 'pdfmake/build/vfs_fonts';
(<any>pdfMake).vfs = pdfFonts.pdfMake.vfs;
// I also tried 'pdfMake as any'

Everything works fine with pdfMake at the development stage. But I received error at quasar build:

Error when using sourcemap for reporting an error: Can't resolve original location of error. 
'pdfMake' is not exported by 'node modules/pdfmake/build/vfs fontsjs'
Error when using sourcemap for reporting an error: Can't resolve original location of error. 
Illegal reassignment to import 'pdfMake'
vietmoda commented 9 months ago

me too @@

ar2rsoft commented 8 months ago

same error

peulessa commented 2 weeks ago

I have the same problem...