Compare commits

..

3 Commits
8.2.1 ... 8.2.2

Author SHA1 Message Date
63db9f290c Version bump 2023-07-20 22:44:30 +01:00
e8bd4bd6c6 Merge pull request #2256 from dolanmiu/feature/tweak-build
Remove default browser export
2023-07-20 22:42:56 +01:00
28d93b0c42 Remove default browser export
Fixes Angular issue
2023-07-20 20:46:53 +01:00
4 changed files with 6 additions and 9 deletions

4
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

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

View File

@ -9,7 +9,7 @@ export default defineConfig({
tsconfigPaths(), tsconfigPaths(),
dts(), dts(),
nodePolyfills({ nodePolyfills({
exclude: ["fs"], exclude: [],
globals: { globals: {
Buffer: false, Buffer: false,
}, },