Back to Trigger

Bundle Packages

docs/snippets/bundle-packages.mdx

4.4.5768 B
Original Source
<Tabs> <Tab title="Bundle everything">
Bundle all ESM packages so that you don't have to specifiy them manually like this:

```ts trigger.config.ts
import type { TriggerConfig } from "@trigger.dev/sdk";

export const config: TriggerConfig = {
  //..other stuff
  dependenciesToBundle: [/.*/],
};
```
</Tab> <Tab title="Bundle individual packages">
Bundle individual packages using strings or regex like this:

```ts trigger.config.ts
import type { TriggerConfig } from "@trigger.dev/sdk";

export const config: TriggerConfig = {
  //..other stuff
  //either regex or strings of package names
  dependenciesToBundle: [/@sindresorhus/, "escape-string-regexp"],
};
```
</Tab> </Tabs>