From c4f9db2cb375729b06f438298560045d4c488c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borkesz=20M=C3=A1t=C3=A9?= <31795051+borkeszmate@users.noreply.github.com> Date: Tue, 9 Nov 2021 15:50:06 +0100 Subject: [PATCH] fix(plugin-vue): use __vccOpts for vue-class-component (#5374) --- packages/plugin-vue/src/helper.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } `