File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/xl-docx-exporter/src/docx Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,10 @@ export class DOCXExporter<
154154 geistMonoFont instanceof Uint8Array
155155 ) {
156156 // conversion with Polyfill needed because docxjs requires Buffer
157- const Buffer = ( await import ( "buffer" ) ) . default . Buffer ;
157+ // NOTE: the buffer/ import is intentional and as documented in
158+ // the `buffer` package usage instructions
159+ // https://github.com/feross/buffer?tab=readme-ov-file#usage
160+ const Buffer = ( await import ( "buffer/" ) ) . Buffer ;
158161
159162 if ( interFont instanceof ArrayBuffer ) {
160163 interFont = Buffer . from ( interFont ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export async function loadFontDataUrl(requireUrl: { default: string }) {
2626
2727export async function loadFileBuffer ( requireUrl : {
2828 default : string ;
29- } ) : Promise < Buffer | ArrayBuffer > {
29+ } ) {
3030 if ( import . meta. env . NODE_ENV === "test" ) {
3131 // in vitest, this is the url we need to load with readfilesync
3232 // eslint-disable-next-line
You can’t perform that action at this time.
0 commit comments