Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
63db9f290c | |||
e8bd4bd6c6 | |||
28d93b0c42 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "docx",
|
"name": "docx",
|
||||||
"version": "8.2.1",
|
"version": "8.2.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "docx",
|
"name": "docx",
|
||||||
"version": "8.2.1",
|
"version": "8.2.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "^20.3.1",
|
"@types/node": "^20.3.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "docx",
|
"name": "docx",
|
||||||
"version": "8.2.1",
|
"version": "8.2.2",
|
||||||
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "build/index.umd.js",
|
"main": "build/index.umd.js",
|
||||||
@ -8,9 +8,6 @@
|
|||||||
"types": "./build/index.d.ts",
|
"types": "./build/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"browser": {
|
|
||||||
"default": "./build/index.umd.js"
|
|
||||||
},
|
|
||||||
"require": "./build/index.cjs",
|
"require": "./build/index.cjs",
|
||||||
"types": "./build/index.d.ts",
|
"types": "./build/index.d.ts",
|
||||||
"import": "./build/index.js",
|
"import": "./build/index.js",
|
||||||
|
@ -68,11 +68,11 @@ export const patchDocument = async (data: InputDataType, options: PatchDocumentO
|
|||||||
const hyperlinkRelationshipAdditions: IHyperlinkRelationshipAddition[] = [];
|
const hyperlinkRelationshipAdditions: IHyperlinkRelationshipAddition[] = [];
|
||||||
let hasMedia = false;
|
let hasMedia = false;
|
||||||
|
|
||||||
const binaryContentMap = new Map<string, Buffer>();
|
const binaryContentMap = new Map<string, Uint8Array>();
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(zipContent.files)) {
|
for (const [key, value] of Object.entries(zipContent.files)) {
|
||||||
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
|
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
|
||||||
binaryContentMap.set(key, await value.async("nodebuffer"));
|
binaryContentMap.set(key, await value.async("uint8array"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ export default defineConfig({
|
|||||||
tsconfigPaths(),
|
tsconfigPaths(),
|
||||||
dts(),
|
dts(),
|
||||||
nodePolyfills({
|
nodePolyfills({
|
||||||
exclude: ["fs"],
|
exclude: [],
|
||||||
globals: {
|
globals: {
|
||||||
Buffer: false,
|
Buffer: false,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user