diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index 1a22c50ff10..b85e3b3b732 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -205,5 +205,7 @@ export function defineComponent< // implementation, close to no-op export function defineComponent(options: unknown) { - return isFunction(options) ? { setup: options } : options + return isFunction(options) + ? { setup: options, name: options.name } + : options }