diff --git a/packages/plugin-vue/src/helper.ts b/packages/plugin-vue/src/helper.ts index 3b1dbd3407a5fe..64e27560849dee 100644 --- a/packages/plugin-vue/src/helper.ts +++ b/packages/plugin-vue/src/helper.ts @@ -2,9 +2,10 @@ export const EXPORT_HELPER_ID = 'plugin-vue:export-helper' export const helperCode = ` export default (sfc, props) => { + const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { - sfc[key] = val + target[key] = val; } - return sfc + return target; } `