> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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: About the extensions.ts File

## Article: About the extensions.ts File

## Article Link: https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/about-the-extensions-ts-file.md

## Article Content:

# About the extensions.ts File


The `extensions.ts` file is the central configuration file for all [extensions](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/about-extensions-in-the-wix-cli.md) in your Wix CLI project. This file must be located in the `src/` directory and serves as the registry where you define and organize all the extensions that add functionality to your project.

## How the extensions.ts file works

The `extensions.ts` file uses a builder pattern syntax that allows you to chain extension configurations together. This approach provides a clean, readable way to manage multiple extensions in your project.

The `extensions.ts` file follows this basic structure:

```typescript
import { app, extensions } from '@wix/custom-extensions';

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

The file:

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

### Import-based registration

You can also import extension configurations from separate files and register them. For example:

**extensions.ts**

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

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

**my-imported-page.extension.ts**

```typescript
import { extensions } from '@wix/custom-extensions';

export default extensions.dashboardPage({
  id: '154f642e-a705-4ff3-8421-6119354a3384',
  title: 'My Imported Page',
  routePath: 'my-imported-page',
  component: './extensions/dashboard/pages/my-imported-page/my-imported-page.tsx',
});
```

## Automatic extension management

You can add extensions to your project using the [generate](https://dev.wix.com/docs/wix-cli/cli-for-apps/command-reference/project-commands/generate.md) command. After running this command and following the prompts, CLI:

- Creates the extension's files and code, including a `.extension.ts` file containing the builder. By default, it uses the naming pattern `[extension-name].extension.ts`, however, you can rename these files to anything you want.
- Adds the necessary import statement and `.use()` method call to register the new extension in the `extensions.ts` file.

## Remove deleted extensions

When you delete an extension from your project, you should also remove its registration from the `extensions.ts` file. This involves removing both:

- The import statement for any extension builders.
- The `.use()` method call that registers the extension.


## See also

- [About App Extensions in the Wix CLI](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/about-extensions-in-the-wix-cli.md)
- [Wix CLI Project Structure](https://dev.wix.com/docs/wix-cli/cli-for-apps/project-structure/about-the-app-project-structure.md)