Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/sim/next.config.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
Comment thread
j15z marked this conversation as resolved.
* @vitest-environment node
*/
import { describe, expect, it } from 'vitest'
import nextConfig from '@/next.config'

describe('Next.js server dependency packaging', () => {
it('keeps pdfjs external to the production server bundle', () => {
expect(nextConfig.serverExternalPackages).toContain('pdfjs-dist')
})
})
5 changes: 5 additions & 0 deletions apps/sim/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ const nextConfig: NextConfig = {
'@daytona/sdk',
'@earendil-works/pi-ai',
'@earendil-works/pi-coding-agent',
/**
* PDF.js loads its worker and optional canvas primitives relative to its package at runtime.
* Bundling relocates that code and leaves DOMMatrix unavailable in the standalone image.
*/
'pdfjs-dist',
// The collab-doc seed converter lazily `require`s jsdom for a headless TipTap editor. Keep it
// external so webpack doesn't try to bundle jsdom's dynamic internal requires.
'jsdom',
Expand Down
Loading