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.
| Legacy | New |
|---|---|
src/backend/events/<name>/event.ts | src/extensions/backend/events/<name>/<name>.ts |
| (no config file) | src/extensions/backend/events/<name>/<name>.extension.ts |
To move existing files into the new project:
src/extensions/backend/events/<name>/.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.<name>.ts, add export default before the top-level handler call if it isn't already there:.ts file if needed, including imports of backend code.In src/extensions/backend/events/<name>/, create <name>.extension.ts:
| Field | Value | Required |
|---|---|---|
id | A new UUID. Generate 1 with crypto.randomUUID(). | Yes |
source | Path to <name>.ts, relative to src/ | Yes |
In the new project, in src/extensions.ts, import the extension and add it with .use():
Return to the Test, build, and release step in the main migration guide.
Last updated: 29 June 2026