diff --git a/src/exportHelper.ts b/src/exportHelper.ts index ebf27a3c4..9f98b41e5 100644 --- a/src/exportHelper.ts +++ b/src/exportHelper.ts @@ -1,8 +1,9 @@ // runtime helper for setting properties on components // in a tree-shakable way export default (sfc: any, props: [string, string][]) => { + const target = sfc.__vccOpts || sfc for (const [key, val] of props) { - sfc[key] = val + target[key] = val } - return sfc + return target }