Skip to content

Commit e8bd4bd

Browse files
authored
Merge pull request dolanmiu#2256 from dolanmiu/feature/tweak-build
Remove default browser export
2 parents 95f8e37 + 28d93b0 commit e8bd4bd

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"types": "./build/index.d.ts",
99
"exports": {
1010
".": {
11-
"browser": {
12-
"default": "./build/index.umd.js"
13-
},
1411
"require": "./build/index.cjs",
1512
"types": "./build/index.d.ts",
1613
"import": "./build/index.js",

src/patcher/from-docx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ export const patchDocument = async (data: InputDataType, options: PatchDocumentO
6868
const hyperlinkRelationshipAdditions: IHyperlinkRelationshipAddition[] = [];
6969
let hasMedia = false;
7070

71-
const binaryContentMap = new Map<string, Buffer>();
71+
const binaryContentMap = new Map<string, Uint8Array>();
7272

7373
for (const [key, value] of Object.entries(zipContent.files)) {
7474
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
75-
binaryContentMap.set(key, await value.async("nodebuffer"));
75+
binaryContentMap.set(key, await value.async("uint8array"));
7676
continue;
7777
}
7878

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
tsconfigPaths(),
1010
dts(),
1111
nodePolyfills({
12-
exclude: ["fs"],
12+
exclude: [],
1313
globals: {
1414
Buffer: false,
1515
},

0 commit comments

Comments
 (0)