Skip to content

Commit e754c20

Browse files
committed
fix(audio-processing): externalize FFmpeg to fix Docker build
Marks @ffmpeg/ffmpeg and @ffmpeg/util as external in tsup build to prevent bundling browser-only code during Node.js builds. This resolves "ffmpeg.wasm does not support nodejs" error during Docker image builds. Changes: - Add --external flags to tsup build commands - Reorder package.json exports (types first)
1 parent b3e96a7 commit e754c20

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

packages/audio-processing/package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,23 @@
77
"types": "./dist/index.d.ts",
88
"exports": {
99
".": {
10+
"types": "./dist/index.d.ts",
1011
"import": "./dist/index.mjs",
11-
"require": "./dist/index.js",
12-
"types": "./dist/index.d.ts"
12+
"require": "./dist/index.js"
1313
}
1414
},
1515
"scripts": {
16-
"build": "tsup src/index.ts --format cjs,esm --dts",
17-
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
16+
"build": "tsup src/index.ts --format cjs,esm --dts --external @ffmpeg/ffmpeg --external @ffmpeg/util",
17+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch --external @ffmpeg/ffmpeg --external @ffmpeg/util",
1818
"clean": "rm -rf dist",
1919
"type-check": "tsc --noEmit"
2020
},
21-
"keywords": ["audio", "ffmpeg", "extraction", "processing"],
21+
"keywords": [
22+
"audio",
23+
"ffmpeg",
24+
"extraction",
25+
"processing"
26+
],
2227
"author": "Keven Markham",
2328
"license": "ISC",
2429
"sideEffects": false,

0 commit comments

Comments
 (0)