Skip to content

Commit

Permalink
Merge pull request #2256 from dolanmiu/feature/tweak-build
Browse files Browse the repository at this point in the history
Remove default browser export
  • Loading branch information
dolanmiu authored Jul 20, 2023
2 parents 95f8e37 + 28d93b0 commit e8bd4bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/patcher/from-docx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export const patchDocument = async (data: InputDataType, options: PatchDocumentO
const hyperlinkRelationshipAdditions: IHyperlinkRelationshipAddition[] = [];
let hasMedia = false;

const binaryContentMap = new Map<string, Buffer>();
const binaryContentMap = new Map<string, Uint8Array>();

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;
}

Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
tsconfigPaths(),
dts(),
nodePolyfills({
exclude: ["fs"],
exclude: [],
globals: {
Buffer: false,
},
Expand Down

0 comments on commit e8bd4bd

Please sign in to comment.