> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: extensions.ts

## Article: extensions.ts

## Article Link: https://dev.wix.com/docs/wix-cli/cli-for-headless/project-structure/folders-and-files/extensions-ts.md

## Article Content:

# extensions.ts

The `extensions.ts` file is the configuration file where you register all your project's extensions. It must be located in the `src/` directory. It imports and registers each extension, wherever the extension lives under `src/`. When you move an extension file, update its import path here to maintain the connection. To see the extensions you can add, run [`wix generate`](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/generate.md).

The file uses a builder pattern syntax that allows you to chain extension configurations together. It follows this basic structure, where `extensionType` stands for the builder of the extension you register, such as `dashboardPage`:

```typescript
import { app, extensions } from '@wix/astro/builders';

export default app()
  .use(extensions.extensionType({
    // Extension configuration
  }));
```

The file:

- Imports the necessary builders from `@wix/astro/builders`.
- Exports a default app configuration.
- Uses the `.use()` method to register extensions.

`extensions.ts` can also import an extension that's declared in its own `.extension.ts` file, described in [src/extensions/](https://dev.wix.com/docs/wix-cli/cli-for-headless/project-structure/folders-and-files/src-extensions.md). For example:

```typescript
import { app } from '@wix/astro/builders';
import myImportedPage from './extensions/dashboard/pages/my-imported-page/my-imported-page.extension.ts';

export default app()
  .use(myImportedPage);
```

When `wix generate` creates an extension, it adds the import statement and the `.use()` method call that register the new extension in `extensions.ts`.

When you delete an extension, remove both its import statement and its `.use()` method call from `extensions.ts`.