Skip to content

Commit dfb46d8

Browse files
authored
chore(docs): add WASM external configuration documentation (#2871)
Adds a WASM block to the External section documenting that WASM packages must be added to the `external` array in `trigger.config.ts`.
1 parent 9942518 commit dfb46d8

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

docs/config/config-file.mdx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,25 @@ export default defineConfig({
448448
});
449449
```
450450

451+
#### WebAssembly (WASM) packages
452+
453+
Packages that use WebAssembly (WASM) must be added to the `external` array. WASM files are binary modules that need to be loaded at runtime and cannot be bundled into JavaScript code. When you add a WASM package to `external`, the package will be installed as a dependency in the runtime environment, ensuring the WASM files are available at their expected paths.
454+
455+
```ts trigger.config.ts
456+
import { defineConfig } from "@trigger.dev/sdk";
457+
458+
export default defineConfig({
459+
project: "<project ref>",
460+
// Your other config settings...
461+
build: {
462+
external: ["your-wasm-package-name"],
463+
},
464+
});
465+
```
466+
451467
<Note>
452-
Any packages that install or build a native binary should be added to external, as native binaries
453-
cannot be bundled. For example, `re2`, `sharp`, and `sqlite3` should be added to external.
468+
Any packages that install or build a native binary or use WebAssembly (WASM) should be added to external, as they
469+
cannot be bundled. For example, `re2`, `sharp`, `sqlite3`, and WASM packages should be added to external.
454470
</Note>
455471

456472
### JSX

0 commit comments

Comments
 (0)