Migrate an Event Extension

This guide explains how to add an event extension to your new Wix CLI project as part of migrating an app from the legacy Wix CLI.

Folder structure

LegacyNew
src/backend/events/<name>/event.tssrc/extensions/backend/events/<name>/<name>.ts
(no config file)src/extensions/backend/events/<name>/<name>.extension.ts

Step 1 | Move and rename files

To move existing files into the new project:

  1. In the new project, create the folder src/extensions/backend/events/<name>/.
  2. Copy event.ts from the legacy project's src/backend/events/<name>/ folder into the new project's src/extensions/backend/events/<name>/ folder, and rename it to <name>.ts.
  3. In <name>.ts, add export default before the top-level handler call if it isn't already there:
Copy
  1. Fix any import paths in the .ts file if needed, including imports of backend code.

Step 2 | Create the extension file

In src/extensions/backend/events/<name>/, create <name>.extension.ts:

Copy
FieldValueRequired
idA new UUID. Generate 1 with crypto.randomUUID().Yes
sourcePath to <name>.ts, relative to src/Yes

Step 3 | Register the extension

In the new project, in src/extensions.ts, import the extension and add it with .use():

Copy

Step 4 | Return to the main migration guide

Return to the Test, build, and release step in the main migration guide.

Last updated: 29 June 2026

Did this help?