Skip to content

Commit

Permalink
fix(plugin-vue): use __vccOpts for vue-class-component (#5374)
Browse files Browse the repository at this point in the history
  • Loading branch information
borkeszmate authored Nov 9, 2021
1 parent ee30ad7 commit 01a6e4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/plugin-vue/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
`

0 comments on commit 01a6e4b

Please sign in to comment.