> 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: extensions.ts

## Article: extensions.ts

## Article Link: https://dev.wix.com/docs/wix-cli/cli-for-apps/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, and the entry point the CLI reads to discover them. It must be located in the `src/` directory. It calls `app()` and chains a `.use()` for each extension, wherever that extension lives under `src/`. When you move an extension file, update its import path here to maintain the connection.

The file uses a builder pattern syntax that allows you to chain extension configurations together.

The following example shows its basic structure, with a single dashboard page declared inline:

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

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

The file:

- Imports `app` and the extension builders from `@wix/custom-extensions`.
- Exports a default app configuration, created by `app()`.
- Uses the `.use()` method to register each extension.

`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-apps/project-structure/folders-and-files/src-extensions.md). For example:

```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);
```

`app()` also carries configuration that belongs to the project rather than to any single extension, such as the `apiDir` option described in [src/api/](https://dev.wix.com/docs/wix-cli/cli-for-apps/project-structure/folders-and-files/src-api.md).

When `wix app 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`.