This guide explains how to add an embedded script extension to your new Wix CLI project as part of migrating an app from the legacy Wix CLI.
| Legacy | New |
|---|---|
src/site/plugins/<name>/embedded.json | src/extensions/site/plugins/embedded-script/<name>/<name>.extension.ts |
src/site/plugins/<name>/embedded.html | src/extensions/site/plugins/embedded-script/<name>/<name>.html |
To move existing files into the new project:
src/extensions/site/plugins/embedded-script/<name>/.embedded.html from the legacy project's src/site/plugins/<name>/ folder into the new project's src/extensions/site/plugins/embedded-script/<name>/ folder, and rename it to <name>.html.Don't copy the old embedded.json file. It is replaced by a new .extension.ts file.
In src/extensions/site/plugins/embedded-script/<name>/, create <name>.extension.ts:
| Field | Source | Required |
|---|---|---|
id | id from embedded.json | Yes. Must match legacy value to preserve the extension. |
name | name from embedded.json | Yes |
placement | placement from embedded.json | Yes |
scriptType | scriptType from embedded.json | Yes |
source | Path to <name>.html, relative to src/ | Yes |
Important:
The id must match the value from the legacy embedded.json. Otherwise, the new entry is treated as a separate extension instead of a continuation of the legacy one.
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