Add a site plugin extension to your new Wix CLI project as part of migrating an app from the legacy Wix CLI.
| Legacy path | New path |
|---|---|
src/site/plugins/custom-elements/<name>/plugin.json | src/extensions/site/plugins/<name>/<name>.extension.ts |
src/site/plugins/custom-elements/<name>/plugin.tsx | src/extensions/site/plugins/<name>/<name>.tsx |
src/site/plugins/custom-elements/<name>/panel.tsx | src/extensions/site/plugins/<name>/<name>.panel.tsx |
src/site/plugins/custom-elements/<name>/plugin.module.css | src/extensions/site/plugins/<name>/<name>.module.css |
Note: <name> is your extension's folder name in the legacy project. The new folder and files use the same name.
In the new project:
src/extensions/site/plugins/<name>/.src/site/plugins/custom-elements/<name>/ folder, copy the following files into the new folder, and rename them:
plugin.tsx to <name>.tsxpanel.tsx to <name>.panel.tsxplugin.module.css, if present, to <name>.module.cssDon't copy the legacy plugin.json file. You recreate its values in <name>.extension.ts.
In <name>.tsx and <name>.panel.tsx:
In the new project:
In src/extensions/site/plugins/<name>/, create <name>.extension.ts.
Add the following code, and set each field to the value the table below specifies:
| Field | Source in legacy project | What to specify |
|---|---|---|
id | id in plugin.json | Copy source as is |
referenceComponentId | referenceComponentId in plugin.json | Copy source as is |
name | marketData.name in plugin.json | Copy source as is |
marketData | marketData in plugin.json | Copy source as is. If marketData.logoUrl references a local assets/ folder, see Update the logo URL. |
placements | placements in plugin.json | 1 object per legacy entry, with the same appDefinitionId, widgetId, and slotId |
installation.autoAdd | installation.autoAddToSite in plugin.json | Copy source as is, or false if the legacy config doesn't set it |
tagName | None | The extension folder name |
element | None | Path to <name>.tsx, relative to src/ |
settings | None | Path to <name>.panel.tsx, relative to src/ |
Important:
The id and referenceComponentId must match the values from the legacy plugin.json. If id differs, the new entry is treated as a separate extension instead of a continuation of the legacy one. If referenceComponentId differs, the plugin registers a new custom element component instead of reusing the one the legacy app already registered.
If the legacy plugin.json has a marketData.logoUrl that references a local assets/ folder, replace it with {{BASE_URL}}/site-plugin-logo.svg:
Move the logo file itself into the new project's public/ folder, which is where {{BASE_URL}} resolves to.
In the new project, in src/extensions.ts:
Import the extension:
Add a .use() call for it to the app() chain, on its own line:
Return to Install the extension's dependencies in the main migration guide.
Last updated: 11 November 2026