# 2. A module bundler - the fun begins

<figure><img src="/files/6T3mkUF582HmwgPcv48x" alt="" width="256"><figcaption><p>exile.watch logo</p></figcaption></figure>

*This page is part of* [Lerna - the hidden powerhouse of exile.watch](/march-2024/lerna-the-hidden-powerhouse-of-exile.watch.md#the-toolkit-i-needed-to-make-it-all-happen) *list - 2/7*

***

{% hint style="info" %}
While you technically don't need a module bundler to get your project off the ground (you could just transpile each file from source to output directory and adjust your `package.json` accordingly), using one can streamline your process significantly.
{% endhint %}

I went with [Rollup](https://rollupjs.org/), thanks to my previous experience with it. You can read more about bundlers [here](https://snipcart.com/blog/javascript-module-bundler).

{% hint style="info" %}
*To keep it clear: Rollup itself is **not** opinionated - just look at this* [*list*](https://rollupjs.org/configuration-options/)
{% endhint %}

You can make Rollup's config somewhat opinionated easily which means that if you find a setup that works for one package, it's likely to work across the board with minimal fuss.

This consistency is a big win when managing multiple packages, ensuring they're all bundled efficiently in the same manner.

So, what's the deal with the packages in [exile.watch](https://exile.watch/)?

Each package serves its unique purpose, acting as a piece of the larger puzzle. They're essentially [boilerplates](https://en.wikipedia.org/wiki/Boilerplate_code) for different areas of functionality:

* [`@exile-watch/typescript-config`](https://github.com/exile-watch/splinters/pkgs/npm/typescript-config) bundles [TypeScript](https://www.typescriptlang.org/) and related dependencies. Adding it as a dev dependency means you’re indirectly installing TypeScript itself.
* [`@exile-watch/unit-testing-config`](https://github.com/exile-watch/splinters/pkgs/npm/unit-testing-config) includes everything you need for [React](https://react.dev/)/JavaScript unit testing, like [Vitest](https://vitest.dev/) and [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/), along with a few other relevant plugins.

And it doesn’t stop there.

***

Each package adopts a specific stance, making sure that whether I’m whipping up a new consumer app, a browser extension, or even a desktop application, the development experience remains consistent.&#x20;

***Everything is expected to work, act, and behave the same, regardless of where it’s implemented.***

***

*Having established our bundling strategy with Rollup, the next logical step is to consider where our packages will live.*&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://engineering.exile.watch/march-2024/lerna-the-hidden-powerhouse-of-exile.watch/2.-a-module-bundler-the-fun-begins.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
