Skip to content

Commit b9e2986

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/permission-aware-knowledge
2 parents af2557b + a663c4e commit b9e2986

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

apps/sim/next.config.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @vitest-environment node
3+
*/
4+
import { describe, expect, it } from 'vitest'
5+
import nextConfig from '@/next.config'
6+
7+
describe('Next.js server dependency packaging', () => {
8+
it('keeps pdfjs external to the production server bundle', () => {
9+
expect(nextConfig.serverExternalPackages).toContain('pdfjs-dist')
10+
})
11+
})

apps/sim/next.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ const nextConfig: NextConfig = {
9999
'@daytona/sdk',
100100
'@earendil-works/pi-ai',
101101
'@earendil-works/pi-coding-agent',
102+
/**
103+
* PDF.js loads its worker and optional canvas primitives relative to its package at runtime.
104+
* Bundling relocates that code and leaves DOMMatrix unavailable in the standalone image.
105+
*/
106+
'pdfjs-dist',
102107
// The collab-doc seed converter lazily `require`s jsdom for a headless TipTap editor. Keep it
103108
// external so webpack doesn't try to bundle jsdom's dynamic internal requires.
104109
'jsdom',

0 commit comments

Comments
 (0)