---
title: Add a module initializer
slug: cms-13/docs/add-a-module-initializer
docTags: 
createdAt: 2026-07-30T20:22:03.486Z
---

A module initializer is a JavaScript function that runs when the related module starts. This is useful for performing configuration or script loading before the edit user interface is available.

Configure the initializer in the `module.config` file for your app (add-on). The `initializer` attribute on the `clientModule` element determines the path to the module initializer to run. For example:

```xml
<clientModule initializer="acme/Initializer">
</clientModule>
```

The module initializer returns an object that has an `initialize` function. This function is called when the module initializer runs. Extend `epi/_Module` when implementing a module initializer because it implements the expected API and provides helper methods for common initializer actions. The skeleton for a module initializer looks like this:

```javascript
define([
    'dojo/_base/declare',
    'epi/_Module'
  ],
  function (declare, _Module) {
    return declare([_Module], {
      initialize: function () {
        this.inherited(arguments);
      }
    });
  }
);
```
