From 28d93b0c4243d4bcfff7c84d27a5a3201a54d405 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Thu, 20 Jul 2023 20:46:53 +0100 Subject: [PATCH] Remove default browser export Fixes Angular issue --- package.json | 3 --- src/patcher/from-docx.ts | 4 ++-- vite.config.ts | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 89785f0813..bac5a3fb5f 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,6 @@ "types": "./build/index.d.ts", "exports": { ".": { - "browser": { - "default": "./build/index.umd.js" - }, "require": "./build/index.cjs", "types": "./build/index.d.ts", "import": "./build/index.js", diff --git a/src/patcher/from-docx.ts b/src/patcher/from-docx.ts index becfccf381..bcb69995d3 100644 --- a/src/patcher/from-docx.ts +++ b/src/patcher/from-docx.ts @@ -68,11 +68,11 @@ export const patchDocument = async (data: InputDataType, options: PatchDocumentO const hyperlinkRelationshipAdditions: IHyperlinkRelationshipAddition[] = []; let hasMedia = false; - const binaryContentMap = new Map(); + const binaryContentMap = new Map(); for (const [key, value] of Object.entries(zipContent.files)) { if (!key.endsWith(".xml") && !key.endsWith(".rels")) { - binaryContentMap.set(key, await value.async("nodebuffer")); + binaryContentMap.set(key, await value.async("uint8array")); continue; } diff --git a/vite.config.ts b/vite.config.ts index c40d183673..cc3d2cc547 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ tsconfigPaths(), dts(), nodePolyfills({ - exclude: ["fs"], + exclude: [], globals: { Buffer: false, },