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<
154
154
geistMonoFont instanceof Uint8Array
155
155
) {
156
156
// 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 ;
158
161
159
162
if ( interFont instanceof ArrayBuffer ) {
160
163
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 }) {
26
26
27
27
export async function loadFileBuffer ( requireUrl : {
28
28
default : string ;
29
- } ) : Promise < Buffer | ArrayBuffer > {
29
+ } ) {
30
30
if ( import . meta. env . NODE_ENV === "test" ) {
31
31
// in vitest, this is the url we need to load with readfilesync
32
32
// eslint-disable-next-line
You can’t perform that action at this time.
0 commit comments