---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / CreateBundleV2Options

# Interface: CreateBundleV2Options

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:476](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L476)

Configuration for v2 bundle archive creation.

Unlike v1, the archive layout has no project-slug prefix: built files sit
directly under `{rootDir}/` and the SSR configuration is written into the
archive at `{rootDir}/{configPath}` rather than being sent as request fields.

## Extended by

- [`PushV2Options`](PushV2Options.md)

## Properties

### buildDirectory?

> `optional` **buildDirectory**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:519](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L519)

Path to the build directory containing the application build output.

#### Default

```ts
'build'
```

***

### bundleMetadata?

> `optional` **bundleMetadata**: [`BundleV2Metadata`](BundleV2Metadata.md)

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:513](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L513)

Bundle metadata written into the config file (dependencies, ccOverrides).

***

### configPath?

> `optional` **configPath**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:540](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L540)

Path to the in-archive config file, relative to `rootDir`.

#### Default

```ts
'.mrt/config.json'
```

***

### matchMode?

> `optional` **matchMode**: [`BundleV2MatchMode`](../type-aliases/BundleV2MatchMode.md)

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:546](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L546)

How the server handles ssrOnly/ssrShared patterns that match no files.

#### Default

```ts
'strict'
```

***

### message?

> `optional` **message**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:481](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L481)

Optional message describing the bundle.
Defaults to a git-based message or a timestamp.

***

### projectDirectory?

> `optional` **projectDirectory**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:528](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L528)

Directory to read `config.server.{ts,js}` from when there is no on-disk v2
config file and ssrOnly/ssrShared are not provided explicitly. The config
is read straight from source at bundle time (no build step) and its values
are written into the bundle's in-archive config file.

#### Default

```ts
process.cwd()
```

***

### rootDir?

> `optional` **rootDir**: `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:534](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L534)

Archive path prefix under which built files and the config file live.

#### Default

```ts
'bld'
```

***

### ssrOnly?

> `optional` **ssrOnly**: `string`[]

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:498](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L498)

Glob patterns for files that should only run on the server.
Written verbatim into the config file; matched server-side against
paths relative to `rootDir`.
If omitted, read from the on-disk v2 config file
({buildDirectory}/{configPath}) if present, else the project's
`config.server.{ts,js}`, else defaults.

***

### ssrParameters?

> `optional` **ssrParameters**: `Record`\<`string`, `unknown`\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:488](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L488)

SSR parameters written into the in-archive config file.
Merged over defaults and any values from the on-disk v2 config file
({buildDirectory}/{configPath}) or the project's `config.server.{ts,js}`.

***

### ssrShared?

> `optional` **ssrShared**: `string`[]

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts:508](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/bundle.ts#L508)

Glob patterns for files shared between client and server.
Written verbatim into the config file; matched server-side against
paths relative to `rootDir`.
If omitted, read from the on-disk v2 config file
({buildDirectory}/{configPath}) if present, else the project's
`config.server.{ts,js}`, else defaults.
