You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using React with Vite. There is a serious problem needed to be addressed related to vfs_fonts. I am unable to set the vfs_fonts according to the outdated documentation.
// Not even working in locally ❌ import*aspdfMakefrom"pdfmake/build/pdfmake";import*aspdfFontsfrom'pdfmake/build/vfs_fonts';// Also this is an illegal assignment. Imports are readonly ❌ ❌ (<any>pdfMake).vfs=pdfFonts.pdfMake.vfs;
When I apply this code, I am getting the following error.
src/reports/barcode/BarcodeReport2.ts (22:13) Illegal reassignment of import "pdfMake"in"src/reports/barcode/BarcodeReport2.ts".
Then I figured out how to do this without getting an error locally.
// eslint-disable-next-line no-import-assignObject.defineProperty(pdfMake,'vfs',{value: vfs_fonts,writable: false,// optional, makes it read-only});
But in the built version I am getting the following error.
It is so pathetic that developers of the plugin have managed to build one of the best pdf generator library but still not be able to implement a simple function to set the vfs_fonts like this.
I am using React with Vite. There is a serious problem needed to be addressed related to
vfs_fonts
. I am unable to set thevfs_fonts
according to the outdated documentation.When I apply this code, I am getting the following error.
Then I figured out how to do this without getting an error locally.
But in the built version I am getting the following error.
It is so pathetic that developers of the plugin have managed to build one of the best pdf generator library but still not be able to implement a simple function to set the
vfs_fonts
like this.The text was updated successfully, but these errors were encountered: