Add a dashboard page extension to your new Wix CLI project as part of migrating an app from the legacy Wix CLI.
| Legacy path | New path |
|---|---|
src/dashboard/pages/<name>/page.json | src/extensions/dashboard/pages/<name>/<name>.extension.ts |
src/dashboard/pages/<name>/page.tsx | src/extensions/dashboard/pages/<name>/<name>.tsx |
Note: <name> is your extension's folder name in the legacy project. The new folder and files use the same name.
A legacy dashboard page's files can also sit directly in src/dashboard/pages/ instead of in a subfolder. Migrate it like any other page. Since it has no folder to take a name from, choose a <name> for it, for example a slugified version of its title.
In the new project:
src/extensions/dashboard/pages/<name>/.src/dashboard/pages/<name>/ folder, or from src/dashboard/pages/ if the extension has no subfolder, copy page.tsx into the new folder, and rename it to <name>.tsx.Don't copy the legacy page.json file. You recreate its values in <name>.extension.ts.
In <name>.tsx:
page.json, such as import { id } from './page.json', with the value itself. The JSON file isn't copied to the new project. The same applies to an import from another extension's legacy config file, such as a modal's modal.json.wix.config.json, for example to read appId, replace the import with the value. The new project has no wix.config.json.src/dashboard/, copy that code into the new project at the same path, and update the relative imports from the component's new location. See Add the extension to the new project in the main migration guide.Note: Asset imports such as import logo from './logo.svg' resolve to a URL string in the new project, as they do in your legacy project, so they need no change. An import with the ?url suffix also works.
In the new project:
In src/extensions/dashboard/pages/<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 page.json | Copy source as is |
title | title in page.json | Copy source as is |
routePath | None | The page's current route, which keeps the URL the page already has, or a slug of your choice. See Find the current route. |
component | None | Path to <name>.tsx, relative to src/ |
priority | sidebar.priority in page.json | If your legacy page.json sets it, add priority and copy the number as is, to preserve the sidebar order. See Sidebar order (priority). |
Important:
The id must match the value from the legacy page.json. Otherwise, the new entry is treated as a separate extension instead of a continuation of the legacy one.
A legacy page.json has no routePath field. The legacy CLI derives each page's route from where the page's files sit in src/dashboard/pages/:
src/dashboard/pages/ has an empty route. This is the page created with your app.For example, a page in src/dashboard/pages/products/ has the route products, and a page in src/dashboard/pages/products/analytics/ has the route products/analytics.
Important:
The page created with your app has an empty routePath, which is what makes it the page your app opens by default. Specify routePath: '' to keep that. An empty route is a valid value, and the new project's own starter page ships with one, so this page keeps the URL it already had.
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: 10 November 2026