---
title: defineConfig
description: Name the modules that export your app's luna types, in the app's luna.config.ts.
related:
  - /lunas/define-a-luna
  - /lunas/write-lunas-in-python
  - /cli/deploy
---

`defineConfig` names the modules whose exports are your app's luna types. It is the default export of `luna.config.ts`.

```ts luna/luna.config.ts
import { defineConfig } from "luna";

export default defineConfig({ lunas: "./lunas/list.ts" });
```

## Reference

### defineConfig(config)

```ts
import { defineConfig } from "luna";
```

| Prop | Type | Default | Description |
| - | - | - | - |
| `config` | `LunaConfig` | - | Where the app's luna types are exported from. |

Returns the same `LunaConfig`. It throws if `lunas` names no module.

### LunaConfig

| Prop | Type | Default | Description |
| - | - | - | - |
| `lunas` | `string \| string[]` | - | The module whose exports are the app's luna types, relative to the config file, or one module for each language. |

## Good to know

- The file is called `luna.config.ts` and must have `export default defineConfig({...})`. It stays TypeScript when your lunas are written in Python.
- [`luna dev`](/cli/dev) and [`luna deploy`](/cli/deploy) look for `luna.config.ts` in the folder given by `--dir`, the current folder by default. If it is not there, they look in that folder's `luna` folder.
- Each module must be inside the folder that holds the config.
- A module ending in `.py` is read by the Python SDK. Every other module is loaded with Node.js.
- Every export of a module that is a luna type is deployed. Other exports are ignored. A module that exports no luna type fails the deploy, and so do two luna types with the same name.
- The config does not say where the app deploys. The project and environment come from `.env.local`, which `luna projects use` and `luna env use` write. A config that still names a `project` loads, and `luna deploy` warns you to take the field out.

## Examples

### Export luna types from several files

Point the config at one module that re-exports the others.

```ts luna/luna.config.ts
import { defineConfig } from "luna";

export default defineConfig({ lunas: "./lunas/index.ts" });
```

```ts luna/lunas/index.ts
export { List } from "./list.ts";
export { Board } from "./board.ts";
```

### Mix TypeScript and Python

Name one module for each language. Each language's lunas can call the other's, as [Write lunas in Python](/lunas/write-lunas-in-python) shows.

```ts luna/luna.config.ts
import { defineConfig } from "luna";

export default defineConfig({ lunas: ["./lunas/index.ts", "./lunas/wallet.py"] });
```
