> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/rspeedy/rspeedy.filename.bundle.md.

# 

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](/api/rspeedy/index.md) > [@lynx-js/rspeedy](/api/rspeedy/rspeedy.md) > [Filename](/api/rspeedy/rspeedy.filename.md) > [bundle](/api/rspeedy/rspeedy.filename.bundle.md)

## Filename.bundle property

The name of the bundle files.

**Signature:**

```typescript
bundle?: BundleFilename | undefined;
```

## Default Value

`'[name].[platform].bundle'`

## Remarks

The following placeholder is supported:

- `[name]`<!-- -->: the name of the entry. - `[contenthash]`<!-- -->: the contenthash of the bundle. - `[platform]`<!-- -->: the environment name of the bundle.

## Example 1

- Using content hash in bundle filename:

```js
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
  output: {
    filename: {
      bundle: '[name].[contenthash].bundle',
    },
  },
})
```

## Example 2

- Using content hash with length in bundle filename:

```js
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
  output: {
    filename: {
      bundle: '[name].[contenthash:8].bundle',
    },
  },
})
```

## Example 3

- Using a function to control the main bundle and the lazy bundles separately (e.g. emit lazy bundles into another directory with a git commit hash appended):

```js
import { execSync } from 'node:child_process'

import { defineConfig } from '@lynx-js/rspeedy'

const gitHash = execSync('git rev-parse --short HEAD').toString().trim()

export default defineConfig({
  output: {
    filename: {
      bundle: ({ lazyBundle, platform }) =>
        lazyBundle
          ? `my-lazy-bundles/[name].[fullhash]-${gitHash}.bundle`
          : `[name].${platform}.bundle`,
    },
  },
})
```
