> For the complete documentation index, see [llms.txt](https://docs.omlet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omlet.dev/cli-and-dashboard/learn-omlet-cli/config-file/map-aliases.md).

# Mapping aliases

{% hint style="info" %}
Make sure to create the **`.omletrc`** file in the root directory of your repository before getting started.
{% endhint %}

If you have alias set up in a **`tsconfig`** file or a bundler such as Webpack, Vite, or Babel, Omlet may have trouble resolving import paths from aliases out of the box. Omlet can resolve them if you define these aliases in the config file.

If you have a **`tsconfig`** file already, you can simply point to it using the **`tsconfigPath`** field:

{% code title=".omletrc" lineNumbers="true" %}

```javascript
{
  ...
  "tsconfigPath": "tsconfig.frontend.json"
}
```

{% endcode %}

If you have alias setup in a bundler, you can define mapping between your aliases and paths in the **`aliases`** field:

{% code title=".omletrc" lineNumbers="true" %}

```javascript
{
  ...
  "aliases": {
    "@components/*": ["src/components/*"],
    "@icons": ["src/icons/index.tsx"]
  }
}
```

{% endcode %}

If your project is a monorepo with multiple packages, you can define package-specific **`aliases`** configurations using the **`workspaces`** field. Such as:

<pre class="language-json" data-title=".omletrc" data-line-numbers><code class="lang-json">{
<strong>  "workspaces": {
</strong><strong>    "@acme/design-system": {
</strong><strong>      "aliases": {
</strong><strong>        "@components/*": ["src/components/*"],
</strong><strong>        "@icons": ["src/icons/index.tsx"]
</strong><strong>      }
</strong><strong>    }
</strong><strong>  }
</strong>}
</code></pre>

You can check the [Config file](broken://pages/nL1rONAx6V3OoALb0Fae) documentation to learn more about the **`aliases`** property.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.omlet.dev/cli-and-dashboard/learn-omlet-cli/config-file/map-aliases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
