Skip to content

Commit 273b2ce

Browse files
fix: remove the legacy build PDF.js warning
1 parent e05d331 commit 273b2ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pdfjs.rollup.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export default defineConfig({
4646
'#getJsModule(fallbackCallback) {': '#getJsModule(fallbackCallback) { return;',
4747
// Mock the `@napi-rs/canvas` module import from the unused `NodeCanvasFactory` class.
4848
'require("@napi-rs/canvas")': canvasMock,
49+
// Remove the legacy build warning.
50+
'warn("Please use the `legacy` build in Node.js environments.")': '',
4951
},
5052
}),
5153
nodeResolve(),

0 commit comments

Comments
 (0)