From 92c9811b15faf268148a80276503bd9733d58393 Mon Sep 17 00:00:00 2001 From: elle-nk <60674476+elle-nk@users.noreply.github.com> Date: Wed, 3 Jun 2026 18:45:34 -0700 Subject: [PATCH] fix: update default dev command for design mode --- src/config/uiBundleDiscovery.ts | 10 ++++++++-- test/config/uiBundleDiscovery.test.ts | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/config/uiBundleDiscovery.ts b/src/config/uiBundleDiscovery.ts index 27ed74c..d821415 100644 --- a/src/config/uiBundleDiscovery.ts +++ b/src/config/uiBundleDiscovery.ts @@ -22,9 +22,15 @@ import type { UiBundleManifest } from './manifest.js'; const logger = Logger.childFromRoot('UiBundleDiscovery'); /** - * Default command to run when no ui-bundle.json manifest is found + * Default dev command when `ui-bundle.json` does not specify `dev.command`. + * + * Set to `npm run dev:design` so that design-mode clients (notably the Live + * Preview VS Code extension) get hybrid-editor support automatically. The + * bundle's `package.json` must define a `dev:design` script for this + * default to resolve. Bundles that need a different command should set + * `dev.command` in `ui-bundle.json`. */ -export const DEFAULT_DEV_COMMAND = 'npm run dev'; +export const DEFAULT_DEV_COMMAND = 'npm run dev:design'; /** * Standard metadata path segment for uiBundles (relative to package directory). diff --git a/test/config/uiBundleDiscovery.test.ts b/test/config/uiBundleDiscovery.test.ts index 3f8b87e..a71406f 100644 --- a/test/config/uiBundleDiscovery.test.ts +++ b/test/config/uiBundleDiscovery.test.ts @@ -87,8 +87,8 @@ describe('uiBundleDiscovery', () => { }); describe('DEFAULT_DEV_COMMAND', () => { - it('should be npm run dev', () => { - expect(DEFAULT_DEV_COMMAND).to.equal('npm run dev'); + it('should be npm run dev:design', () => { + expect(DEFAULT_DEV_COMMAND).to.equal('npm run dev:design'); }); });