Merge pull request #2256 from dolanmiu/feature/tweak-build
Remove default browser export
This commit is contained in:
@ -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