- npm install react-pdf (v9+ pulls in pdfjs-dist automatically) - Add transpilePackages: ['react-pdf', 'pdfjs-dist'] to next.config.ts - Build verified passing after config change
8 lines
155 B
TypeScript
8 lines
155 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
transpilePackages: ['react-pdf', 'pdfjs-dist'],
|
|
};
|
|
|
|
export default nextConfig;
|