Browse Source

♻️ refactor(documents): 优化pdf-merger-js导入方式

- 将pdf-merger-js的导入方式从命名空间导入改为默认导入
- 符合ES模块规范,减少不必要的命名空间声明
yourname 2 months ago
parent
commit
0bb14fc542
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/server/modules/documents/document.service.ts

+ 1 - 1
src/server/modules/documents/document.service.ts

@@ -1,6 +1,6 @@
 // import { DataSource } from 'typeorm';
 // import { DataSource } from 'typeorm';
 import { PDFDocument } from 'pdf-lib';
 import { PDFDocument } from 'pdf-lib';
-import * as PDFMerger from 'pdf-merger-js';
+import PDFMerger from 'pdf-merger-js';
 import * as mammoth from 'mammoth';
 import * as mammoth from 'mammoth';
 import * as fs from 'fs/promises';
 import * as fs from 'fs/promises';
 import * as path from 'path';
 import * as path from 'path';