# modules_too_large

> All modules together exceed 8 MiB.

All modules together exceed 8 MiB.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Archive and source validation |
| `disko` exit code | 1 (problems) |

All modules together are larger than 8 MiB. Each module may be up to 2 MiB,
but their combined size is capped as well. Assets do not count toward this
limit.

## Why it happens

Large amounts of data kept in source files, such as level tables or encoded
media, spread over several modules.

## Wrong

```text
src/data/maps1.js   2,000,000 bytes
src/data/maps2.js   2,000,000 bytes
src/data/maps3.js   2,000,000 bytes
src/data/maps4.js   2,000,000 bytes
src/data/maps5.js   1,000,000 bytes
```

## Right

```text
src/data/maps1.js     600,000 bytes
src/data/maps2.js     600,000 bytes
```

Store data more compactly, drop unused entries, and move images or sounds out
of source into imported asset files.

## See also

- [Assets](/games/assets)
- [`file_too_large`](/errors/file_too_large)
