---
url: /reference/OutputOptions.name.md
---
# name

* **Type**: `string`
* **Optional**

Specifies the global variable name that contains the exports of `umd` / `iife` [formats](./OutputOptions.format).

## Example

```js
export default defineConfig({
  output: {
    format: 'iife',
    name: 'MyBundle',
  }
});
```

```js
// output
var MyBundle = (function () {
  // ...
})();
```

Namespaces are supported i.e., your name can contain dots. The resulting bundle will contain the setup necessary for the namespacing.

```js
// output for `name: 'a.b.c'`
this.a = this.a || {};
this.a.b = this.a.b || {};
this.a.b.c = (function () {
  // ...
})();
```
