---
url: /reference/Interface.ModuleOptions.md
---
# Interface: ModuleOptions

## Extended by

* [`ModuleInfo`](Interface.ModuleInfo.md)
* [`ResolvedId`](Interface.ResolvedId.md)

## Properties

### description?

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

A short, human-readable description of the module.

This is useful for virtual modules, whose ids (e.g.
`\0vite/modulepreload-polyfill.js`) do not convey their purpose on their own.

#### Example

```js
function polyfillPlugin() {
  return {
    name: 'vite:modulepreload-polyfill',
     load: {
       filter: { id: /^\0vite/modulepreload-polyfill\.js$/ },
       handler(id) {
         return {
           code: '',
           description: 'A polyfill for `link` tag with `rel="modulepreload"`',
         };
       }
     },
  };
}
```

***

### invalidate?

* **Type**: `boolean`
* **Optional**

***

### meta

* **Type**: [`CustomPluginOptions`](Interface.CustomPluginOptions.md)

See [Custom module meta-data section](/apis/plugin-api/inter-plugin-communication#custom-module-meta-data) for more details.

***

### moduleSideEffects

* **Type**: `ModuleSideEffects`

***

### packageJsonPath?

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