diff --git a/src/lib/dev-environment/dev-environment-cli.ts b/src/lib/dev-environment/dev-environment-cli.ts index 4dab86e875..18658cab73 100644 --- a/src/lib/dev-environment/dev-environment-cli.ts +++ b/src/lib/dev-environment/dev-environment-cli.ts @@ -231,7 +231,7 @@ interface LocalComponent { interface ImageComponent { mode: 'image'; - tag: string; + tag: string | undefined; } export function processComponentOptionInput( @@ -258,7 +258,7 @@ export function processComponentOptionInput( return { mode: 'image', - tag: param, + tag: param === 'demo' ? undefined : param, }; } diff --git a/src/lib/dev-environment/dev-environment-core.ts b/src/lib/dev-environment/dev-environment-core.ts index 5c590baefe..2a6f2d72b9 100644 --- a/src/lib/dev-environment/dev-environment-core.ts +++ b/src/lib/dev-environment/dev-environment-core.ts @@ -305,6 +305,11 @@ function parseComponentForInfo( component: ComponentConfig | WordPressConfig ): if ( component.mode === 'local' ) { return component.dir ?? ''; } + + if ( component.tag === 'demo' ) { + component.tag = undefined; + } + return component.tag ?? '[demo-image]'; }