Skip to content

Commit 06a63c6

Browse files
committed
Fix Next.js Pages Router build
1 parent 301b633 commit 06a63c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sample/next-pages/next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
experimental: {
4+
/**
5+
* Critical: prevents "ESM packages (pdfjs-dist/build/pdf.worker.min.mjs) need to be imported." error
6+
*/
7+
esmExternals: 'loose',
48
turbo: {
59
resolveAlias: {
610
// Turbopack does not support standard ESM import paths yet

0 commit comments

Comments
 (0)